From 9315c8b30798902c39310bed637563956579ae43 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 30 Dec 2023 09:07:32 +0100 Subject: [PATCH] fixed autoaiming. The WW2GI pistol check was completely wrong. :( --- source/games/duke/src/player.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/source/games/duke/src/player.cpp b/source/games/duke/src/player.cpp index 6a43bff6bf..840e1dbe6b 100644 --- a/source/games/duke/src/player.cpp +++ b/source/games/duke/src/player.cpp @@ -212,13 +212,11 @@ DDukeActor* aim(DDukeActor* actor, int abase, bool force, bool* b) auto* plr = getPlayer(actor->PlayerIndex()); int autoaim = force? 1 : Autoaim(actor->PlayerIndex()); - bool ww2gipistol = (plr->curr_weapon == PISTOL_WEAPON && isWW2GI()); - bool otherpistol = (plr->curr_weapon == PISTOL_WEAPON && !isWW2GI()); - // Some fudging to avoid aim randomization when autoaim is off. // This is a reimplementation of how it was solved in RedNukem. - if (!ww2gipistol && (autoaim || otherpistol)) + if (plr->curr_weapon == PISTOL_WEAPON) { + if (isWW2GI()) return nullptr; // WW2GI's pistol never autoaims. double vel = 1024, zvel = 0; setFreeAimVelocity(vel, zvel, plr->getPitchWithView(), 16.);