added a crosshair on/off toggle

This commit is contained in:
Alexander 2019-05-18 16:05:57 +07:00 committed by Christoph Oelckers
parent 680a6f348b
commit 7540de4027
2 changed files with 10 additions and 1 deletions

View file

@ -123,6 +123,7 @@ CUSTOM_CVAR(Bool, hud_aspectscale, false, CVAR_ARCHIVE)
}
}
CVAR (Bool, crosshairon, true, CVAR_ARCHIVE);
CVAR (Int, crosshair, 0, CVAR_ARCHIVE)
CVAR (Bool, crosshairforce, false, CVAR_ARCHIVE)
CVAR (Color, crosshaircolor, 0xff0000, CVAR_ARCHIVE);
@ -1029,9 +1030,16 @@ void DBaseStatusBar::DrawCrosshair ()
double size;
int w, h;
if (!crosshairon)
{
return;
}
// Don't draw the crosshair in chasecam mode
if (players[consoleplayer].cheats & CF_CHASECAM)
{
return;
}
ST_LoadCrosshair();

View file

@ -1012,6 +1012,7 @@ OptionMenu "HUDOptions" protected
Submenu "$HUDMNU_FLASH", "FlashOptions"
Submenu "$DSPLYMNU_SCOREBOARD", "ScoreboardOptions"
StaticText " "
Option "$HUDMNU_CROSSHAIRON", "crosshairon", "OnOff"
Option "$HUDMNU_CROSSHAIR", "crosshair", "Crosshairs"
Option "$HUDMNU_FORCECROSSHAIR", "crosshairforce", "OnOff"
Option "$HUDMNU_GROWCROSSHAIR", "crosshairgrow", "OnOff"
@ -2749,4 +2750,4 @@ OptionMenu "vkoptions"
Option "$VKMNU_ENABLE", "vid_enablevulkan", "OnOff"
TextField "$VKMNU_DEVICE", vk_device
Option "$VKMNU_HDR", "vk_hdr", "OnOff"
}
}