From bcf09c303710e0aff4e13380bcf279c448d45674 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 11 Oct 2022 15:25:16 +1100 Subject: [PATCH] - SW: Pitch-adjusted velocity for `InitFistAttack()`. --- 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 1e268124e..4d28797f2 100644 --- a/source/games/sw/src/weapon.cpp +++ b/source/games/sw/src/weapon.cpp @@ -12425,9 +12425,10 @@ int InitFistAttack(PLAYER* pp) // all this is to break glass { HitInfo hit{}; - double daz = pp->horizon.horiz.Tan() * 1000. - (RandomRangeF(24000 / 256.) - 12000 / 256.); + double dax = 1024., daz = 0; auto 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;