diff --git a/source/core/gamecontrol.h b/source/core/gamecontrol.h index ebccf2f82..e7709955a 100644 --- a/source/core/gamecontrol.h +++ b/source/core/gamecontrol.h @@ -120,6 +120,7 @@ enum GAMEFLAG_PSEXHUMED = GAMEFLAG_POWERSLAVE | GAMEFLAG_EXHUMED, // the two games really are the same, except for the name and the publisher. GAMEFLAG_WORLDTOUR = 0x00008000, GAMEFLAG_DUKEDC = 0x00010000, + GAMEFLAG_DUKECOMPAT = GAMEFLAG_DUKE | GAMEFLAG_NAM | GAMEFLAG_NAPALM | GAMEFLAG_WW2GI | GAMEFLAG_RRALL, GAMEFLAGMASK = 0x0000FFFF, // flags allowed from grpinfo // We still need these for the parsers. diff --git a/source/core/gamecvars.cpp b/source/core/gamecvars.cpp index deb6408c0..fc835ec96 100644 --- a/source/core/gamecvars.cpp +++ b/source/core/gamecvars.cpp @@ -87,7 +87,8 @@ CVARD(Bool, cl_exhumedoldturn, false, CVAR_ARCHIVE, "enable/disable legacy turni CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable weapon autoaim") { - if (self < 0 || self > (isBlood() ? 2 : 3)) self = 1; // The Shadow Warrior backend only has a bool for this. + int automodes = (g_gameType & (GAMEFLAG_DUKECOMPAT | GAMEFLAG_BLOOD)) ? 2 : 1; + if (self < 0 || self > automodes) self = 1; }; CUSTOM_CVARD(Int, cl_weaponswitch, 3, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable auto weapon switching") diff --git a/source/core/gamecvars.h b/source/core/gamecvars.h index c3882c122..f8f0d5e0f 100644 --- a/source/core/gamecvars.h +++ b/source/core/gamecvars.h @@ -107,7 +107,7 @@ inline const char* PlayerName(int pindex) return playername; } -inline bool Autoaim(int player) +inline int Autoaim(int player) { // Todo: proper implementation of user CVARs. return cl_autoaim; diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index c488e3382..7048e865c 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -944,7 +944,14 @@ OptionValue "WeapSwitch" OptionMenu GameplayOptions protected { Title "$GMPLYMNU_TITLE" - Option "$PLYRMNU_AUTOAIM", "cl_autoaim", "AimMode" + ifgame(Duke, Nam, WW2GI, Redneck, RedneckRides, Blood) + { + Option "$PLYRMNU_AUTOAIM", "cl_autoaim", "AimMode" + } + else + { + Option "$PLYRMNU_AUTOAIM", "cl_autoaim", "OnOff" + } Option "$PLYRMNU_ALWAYSRUN", "cl_autorun", "OnOff" Option "$PLRMNU_RUNMODE", "cl_runmode", "RunMode" ifgame(ShadowWarrior)