From 2af2d29084892c32bb5cbce3a05edbfcae66ab22 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 26 Jun 2021 12:18:27 +0200 Subject: [PATCH] - add hitscan only autoaim for SW. --- source/core/gamecvars.cpp | 2 +- source/games/sw/src/weapon.cpp | 2 +- wadsrc/static/menudef.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/source/core/gamecvars.cpp b/source/core/gamecvars.cpp index c31fde167..b8d674ec3 100644 --- a/source/core/gamecvars.cpp +++ b/source/core/gamecvars.cpp @@ -86,7 +86,7 @@ CVARD(Bool, cl_hudinterpolation, true, CVAR_ARCHIVE, "enable/disable HUD (weapon CUSTOM_CVARD(Int, cl_autoaim, 1, CVAR_ARCHIVE|CVAR_USERINFO, "enable/disable weapon autoaim") { - int automodes = (g_gameType & (GAMEFLAG_DUKECOMPAT | GAMEFLAG_BLOOD)) ? 2 : 1; + int automodes = (g_gameType & (GAMEFLAG_DUKECOMPAT | GAMEFLAG_BLOOD | GAMEFLAG_SW)) ? 2 : 1; if (self < 0 || self > automodes) self = 1; }; diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index a2a0b190b..2076bb623 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -14284,7 +14284,7 @@ WeaponAutoAim(SPRITEp sp, short Missile, short ang, bool test) if (u && u->PlayerP) { - if (!Autoaim(u->PlayerP->pnum)) + if (Autoaim(u->PlayerP->pnum) != 2) { return -1; } diff --git a/wadsrc/static/menudef.txt b/wadsrc/static/menudef.txt index 76e9fb737..cff36270d 100644 --- a/wadsrc/static/menudef.txt +++ b/wadsrc/static/menudef.txt @@ -954,7 +954,7 @@ OptionValue "WeapSwitch" OptionMenu GameplayOptions protected { Title "$GMPLYMNU_TITLE" - ifgame(Duke, Nam, WW2GI, Redneck, RedneckRides, Blood) + ifgame(Duke, Nam, WW2GI, Redneck, RedneckRides, Blood, ShadowWarrior) { Option "$PLYRMNU_AUTOAIM", "cl_autoaim", "AimMode" }