Skip to content

Commit

Permalink
Draw keys in modern HUD
Browse files Browse the repository at this point in the history
  • Loading branch information
Novum committed Mar 14, 2023
1 parent 832fd9e commit 66a559d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Quake/sbar.c
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,18 @@ static void Sbar_DrawModern (cb_context_t *cbx)
}
}

if (scr_viewsize.value < 110.0f)
{
const int KEY_ICON_X = 284;
const int KEY_ICON_Y = 115;
// keys
for (int i = 0; i < 2; i++)
{
if (cl.items & (1 << (17 + i)) && (!hipnotic || (i > 1)))
Sbar_DrawPic (cbx, KEY_ICON_X, KEY_ICON_Y - (i * 16), sb_items[i]);
}
}

GL_SetCanvas (cbx, CANVAS_SBAR);
if (sb_showscores || cl.stats[STAT_HEALTH] <= 0)
{
Expand Down

0 comments on commit 66a559d

Please sign in to comment.