mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 01:01:33 +00:00
Merge branch 'lua-hud-crosshair' into 'next'
Let Lua toggle the crosshair See merge request STJr/SRB2!1360
This commit is contained in:
commit
cc20f279db
3 changed files with 13 additions and 8 deletions
|
@ -2109,6 +2109,8 @@ void HU_Drawer(void)
|
|||
return;
|
||||
|
||||
// draw the crosshair, not when viewing demos nor with chasecam
|
||||
if (LUA_HudEnabled(hud_crosshair))
|
||||
{
|
||||
if (!automapactive && cv_crosshair.value && !demoplayback &&
|
||||
(!camera.chase || ticcmd_ztargetfocus[0])
|
||||
&& !players[displayplayer].spectator)
|
||||
|
@ -2118,6 +2120,7 @@ void HU_Drawer(void)
|
|||
(!camera2.chase || ticcmd_ztargetfocus[1])
|
||||
&& !players[secondarydisplayplayer].spectator)
|
||||
HU_DrawCrosshair2();
|
||||
}
|
||||
|
||||
// draw desynch text
|
||||
if (hu_redownloadinggamestate)
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
enum hud {
|
||||
hud_stagetitle = 0,
|
||||
hud_textspectator,
|
||||
hud_crosshair,
|
||||
// Singleplayer / Co-op
|
||||
hud_score,
|
||||
hud_time,
|
||||
|
|
|
@ -39,6 +39,7 @@ static UINT8 hudAvailable; // hud hooks field
|
|||
static const char *const hud_disable_options[] = {
|
||||
"stagetitle",
|
||||
"textspectator",
|
||||
"crosshair",
|
||||
|
||||
"score",
|
||||
"time",
|
||||
|
|
Loading…
Reference in a new issue