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
|
@ -2109,15 +2109,18 @@ void HU_Drawer(void)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// draw the crosshair, not when viewing demos nor with chasecam
|
// draw the crosshair, not when viewing demos nor with chasecam
|
||||||
if (!automapactive && cv_crosshair.value && !demoplayback &&
|
if (LUA_HudEnabled(hud_crosshair))
|
||||||
(!camera.chase || ticcmd_ztargetfocus[0])
|
{
|
||||||
&& !players[displayplayer].spectator)
|
if (!automapactive && cv_crosshair.value && !demoplayback &&
|
||||||
HU_DrawCrosshair();
|
(!camera.chase || ticcmd_ztargetfocus[0])
|
||||||
|
&& !players[displayplayer].spectator)
|
||||||
|
HU_DrawCrosshair();
|
||||||
|
|
||||||
if (!automapactive && cv_crosshair2.value && !demoplayback &&
|
if (!automapactive && cv_crosshair2.value && !demoplayback &&
|
||||||
(!camera2.chase || ticcmd_ztargetfocus[1])
|
(!camera2.chase || ticcmd_ztargetfocus[1])
|
||||||
&& !players[secondarydisplayplayer].spectator)
|
&& !players[secondarydisplayplayer].spectator)
|
||||||
HU_DrawCrosshair2();
|
HU_DrawCrosshair2();
|
||||||
|
}
|
||||||
|
|
||||||
// draw desynch text
|
// draw desynch text
|
||||||
if (hu_redownloadinggamestate)
|
if (hu_redownloadinggamestate)
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
enum hud {
|
enum hud {
|
||||||
hud_stagetitle = 0,
|
hud_stagetitle = 0,
|
||||||
hud_textspectator,
|
hud_textspectator,
|
||||||
|
hud_crosshair,
|
||||||
// Singleplayer / Co-op
|
// Singleplayer / Co-op
|
||||||
hud_score,
|
hud_score,
|
||||||
hud_time,
|
hud_time,
|
||||||
|
|
|
@ -39,6 +39,7 @@ static UINT8 hudAvailable; // hud hooks field
|
||||||
static const char *const hud_disable_options[] = {
|
static const char *const hud_disable_options[] = {
|
||||||
"stagetitle",
|
"stagetitle",
|
||||||
"textspectator",
|
"textspectator",
|
||||||
|
"crosshair",
|
||||||
|
|
||||||
"score",
|
"score",
|
||||||
"time",
|
"time",
|
||||||
|
|
Loading…
Reference in New Issue