From 2577ea21f2b2b8fbc896683afed8e8475158a340 Mon Sep 17 00:00:00 2001 From: Mitchell Richters <mjr4077au@gmail.com> Date: Tue, 11 Oct 2022 15:23:58 +1100 Subject: [PATCH] - SW: Pitch-adjusted velocity for `InitSwordAttack()`. --- source/games/sw/src/weapon.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/games/sw/src/weapon.cpp b/source/games/sw/src/weapon.cpp index d175eeaed..1e268124e 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -12247,9 +12247,10 @@ int InitSwordAttack(PLAYER* pp) { HitInfo hit{}; - double daz = pp->horizon.horiz.Tan() * 1000. - (RandomRangeF(24000 / 256.) - 12000 / 256.); + double dax = 1024., daz = 0; DAngle daang = pp->angle.ang; - FAFhitscan(pp->pos, pp->cursector, DVector3(pp->angle.ang.ToVector() * 1024, daz), hit, CLIPMASK_MISSILE); + setFreeAimVelocity(dax, daz, pp->horizon.horiz, 1000. - (RandomRangeF(24000 / 256.) - 12000 / 256.)); + FAFhitscan(pp->pos, pp->cursector, DVector3(pp->angle.ang.ToVector() * dax, daz), hit, CLIPMASK_MISSILE); if (hit.hitSector == nullptr) return 0;