Skip to content

Commit

Permalink
Add a hack for action mod scope scaling.
Browse files Browse the repository at this point in the history
  • Loading branch information
skullernet authored and res2k committed Oct 15, 2023
1 parent 4d769e0 commit 40d7754
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion src/client/screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1600,7 +1600,20 @@ static void SCR_ExecuteLayoutString(const char *s)
}
token = cl.configstrings[CS_IMAGES + index];
if (token[0] && cl.image_precache[index]) {
R_DrawPic(x, y, cl.image_precache[index]);
qhandle_t pic = cl.image_precache[value];
// hack for action mod scope scaling
if (x == scr.hud_width / 2 - 160 &&
y == scr.hud_height / 2 - 120 &&
Com_WildCmp("scope?x", token))
{
int w = 320 * ch_scale->value;
int h = 240 * ch_scale->value;
R_DrawStretchPic((scr.hud_width - w) / 2 + ch_x->integer,
(scr.hud_height - h) / 2 + ch_y->integer,
w, h, pic);
} else {
R_DrawPic(x, y, pic);
}
}

if (value == STAT_SELECTED_ICON && scr_showitemname->integer)
Expand Down

0 comments on commit 40d7754

Please sign in to comment.