diff --git a/src/lua_hud.h b/src/lua_hud.h index 0ab1d0a251ac88a67e3d3300d4ddd37513cdcc91..36ce230ed2a384a73e1f988c41ef79d6d91986a5 100644 --- a/src/lua_hud.h +++ b/src/lua_hud.h @@ -19,6 +19,7 @@ enum hud { hud_stagetitle = 0, hud_textspectator, hud_crosshair, + hud_powerups, // Singleplayer / Co-op hud_score, hud_time, diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c index 52a875e50c0c550f2c10dbb1acd56647955baf01..d665212636530ee8e5610d2175510a2bc7d97444 100644 --- a/src/lua_hudlib.c +++ b/src/lua_hudlib.c @@ -41,6 +41,7 @@ static const char *const hud_disable_options[] = { "stagetitle", "textspectator", "crosshair", + "powerups", "score", "time", diff --git a/src/screen.c b/src/screen.c index c1970d0e8888360511fc0a7990e669b8678a9b3b..813ed91c665eeddc0e5b235c5bfec05bb78425be 100644 --- a/src/screen.c +++ b/src/screen.c @@ -44,6 +44,8 @@ // SRB2Kart #include "r_fps.h" // R_GetFramerateCap +#include "lua_hud.h" // LUA_HudEnabled + // -------------------------------------------- // assembly or c drawer routines for 8bpp/16bpp // -------------------------------------------- @@ -494,6 +496,7 @@ void SCR_ClosedCaptions(void) basey -= 8; else if ((modeattacking == ATTACKING_NIGHTS) || (!(maptol & TOL_NIGHTS) + && LUA_HudEnabled(hud_powerups) && ((cv_powerupdisplay.value == 2) // "Always" || (cv_powerupdisplay.value == 1 && !camera.chase)))) // "First-person only" basey -= 16; diff --git a/src/st_stuff.c b/src/st_stuff.c index 06847988beef820211faa5191fb6b787a549bec2..342c7dcd824b71a9e044fef37114abb7e322e70d 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -2821,14 +2821,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_powerups)) ST_drawPowerupHUD(); // same as it ever was... } - else if (cv_powerupdisplay.value == 2) + else if (cv_powerupdisplay.value == 2 && LUA_HudEnabled(hud_powerups)) 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_powerups)) ST_drawPowerupHUD(); // same as it ever was... if (!(netgame || multiplayer) || !hu_showscores)