mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-22 04:21:23 +00:00
Merge branch 'disable-powerup-hud' into 'next'
Make powerups HUD toggleable via Lua (again) See merge request STJr/SRB2!2234
This commit is contained in:
commit
9b809fec6b
4 changed files with 8 additions and 3 deletions
|
@ -19,6 +19,7 @@ enum hud {
|
|||
hud_stagetitle = 0,
|
||||
hud_textspectator,
|
||||
hud_crosshair,
|
||||
hud_powerups,
|
||||
// Singleplayer / Co-op
|
||||
hud_score,
|
||||
hud_time,
|
||||
|
|
|
@ -41,6 +41,7 @@ static const char *const hud_disable_options[] = {
|
|||
"stagetitle",
|
||||
"textspectator",
|
||||
"crosshair",
|
||||
"powerups",
|
||||
|
||||
"score",
|
||||
"time",
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue