- restrict cl_weaponswitch to 0 and 1 for Shadow Warrior.

This commit is contained in:
Christoph Oelckers 2020-02-12 22:46:18 +01:00
parent e9abbf53c6
commit 1c24ae3fad
2 changed files with 3 additions and 1 deletions

View File

@ -619,6 +619,8 @@ int RunGame()
{ {
hud_size.SetGenericRepDefault(8, CVAR_Int); hud_size.SetGenericRepDefault(8, CVAR_Int);
hud_size_max = 9; hud_size_max = 9;
cl_weaponswitch.SetGenericRepDefault(1, CVAR_Int);
if (cl_weaponswitch > 1) cl_weaponswitch = 1;
} }
if (g_gameType & GAMEFLAG_PSEXHUMED) if (g_gameType & GAMEFLAG_PSEXHUMED)
{ {

View File

@ -99,9 +99,9 @@ CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable wea
}; };
CUSTOM_CVARD(Int, cl_weaponswitch, 3, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable auto weapon switching") CUSTOM_CVARD(Int, cl_weaponswitch, 3, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable auto weapon switching")
{ {
if (self < 0) self = 0; if (self < 0) self = 0;
if (self > 1 && (g_gameType & GAMEFLAG_SW)) self = 1;
if (self > 3 && (g_gameType & GAMEFLAG_BLOOD)) self = 3; if (self > 3 && (g_gameType & GAMEFLAG_BLOOD)) self = 3;
if (self > 7) self = 7; if (self > 7) self = 7;
//UpdatePlayerFromMenu(); todo: networking (only operational in EDuke32 frontend anyway.) //UpdatePlayerFromMenu(); todo: networking (only operational in EDuke32 frontend anyway.)