diff --git a/source/games/duke/src/player.cpp b/source/games/duke/src/player.cpp index f79cadb2c..ab425265e 100644 --- a/source/games/duke/src/player.cpp +++ b/source/games/duke/src/player.cpp @@ -209,7 +209,7 @@ DDukeActor* aim(DDukeActor* actor, int abase, bool force) { // Some fudging to avoid aim randomization when autoaim is off. // This is a reimplementation of how it was solved in RedNukem. - if (plr->curr_weapon == PISTOL_WEAPON && !isWW2GI()) + if (plr->curr_weapon == PISTOL_WEAPON && !isWW2GI() && 0) { double vel = 1024, zvel = 0; setFreeAimVelocity(vel, zvel, plr->Angles.getPitchWithView(), 16.); diff --git a/wadsrc/static/zscript/games/duke/actors/dukeweapons/hitscan.zs b/wadsrc/static/zscript/games/duke/actors/dukeweapons/hitscan.zs index 600f2144c..6672c7619 100644 --- a/wadsrc/static/zscript/games/duke/actors/dukeweapons/hitscan.zs +++ b/wadsrc/static/zscript/games/duke/actors/dukeweapons/hitscan.zs @@ -48,9 +48,7 @@ extend class DukeActor let aimed = actor.aim(self, aimangle); if (aimed) { - double dal = ((aimed.scale.X * aimed.spriteHeight()) * 0.5) + aimed.sparkoffset; - double dist = (p.actor.pos.XY - aimed.pos.XY).Length(); - zvel = ((aimed.pos.Z - pos.Z - dal) * 16) / dist; + [vel, zvel] = Raze.setFreeAimVelocity(vel, zvel, p.getPitchWithView(), 16.); ang = (aimed.pos - pos).Angle(); }