Make powerup HUD disableable via Lua

This commit is contained in:
MIDIMan 2023-12-07 17:56:16 -05:00
parent d6bb89fbb2
commit 3888bf95f2
3 changed files with 5 additions and 3 deletions

View file

@ -19,6 +19,7 @@ enum hud {
hud_stagetitle = 0,
hud_textspectator,
hud_crosshair,
hud_powerup,
// Singleplayer / Co-op
hud_score,
hud_time,

View file

@ -40,6 +40,7 @@ static const char *const hud_disable_options[] = {
"stagetitle",
"textspectator",
"crosshair",
"powerup",
"score",
"time",

View file

@ -2795,14 +2795,14 @@ static void ST_overlayDrawer(void)
|| ((splitscreen && stplyr == &players[secondarydisplayplayer]) && !camera2.chase))
{
ST_drawFirstPersonHUD();
if (cv_powerupdisplay.value)
if (cv_powerupdisplay.value && LUA_HudEnabled(hud_powerup))
ST_drawPowerupHUD(); // same as it ever was...
}
else if (cv_powerupdisplay.value == 2)
else if (cv_powerupdisplay.value == 2 && LUA_HudEnabled(hud_powerup))
ST_drawPowerupHUD(); // same as it ever was...
}
else if (!(netgame || multiplayer) && cv_powerupdisplay.value == 2)
else if (!(netgame || multiplayer) && cv_powerupdisplay.value == 2 && LUA_HudEnabled(hud_powerup))
ST_drawPowerupHUD(); // same as it ever was...
if (!(netgame || multiplayer) || !hu_showscores)