From 3908ec0c4215497adea2e74ee58dc5d7434ab233 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 11 Oct 2022 12:57:01 +1100 Subject: [PATCH] - Duke: Pitch-adjusted velocity for `operateweapon()` when free-aiming. --- source/games/duke/src/player_d.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index f812f7d42..a901a2c9a 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -2197,12 +2197,13 @@ static void operateweapon(int snum, ESyncBits actions) if (p->on_ground && (actions & SB_CROUCH)) { vel = 15/16.; - zvel = p->horizon.sum().Tan() * 10.; + setFreeAimVelocity(vel, zvel, p->horizon.sum(), 10.); } else { vel = 140/16.; - zvel = -4 + p->horizon.sum().Tan() * 10.; + setFreeAimVelocity(vel, zvel, p->horizon.sum(), 10.); + zvel -= 4; } auto spawned = CreateActor(p->cursector, p->pos + p->angle.ang.ToVector() * 16, HEAVYHBOMB, -16, DVector2(0.140625, 0.140625),