From 3a1f1c7580f4b8af9bc4ca954dc5a6235071f9ca Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 11 Oct 2022 12:57:54 +1100 Subject: [PATCH] - Duke: Pitch-adjusted velocity for `operateTripbomb()` when free-aiming. --- source/games/duke/src/player_d.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index a901a2c9a..5ef8d3d6d 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -2008,8 +2008,10 @@ int operateTripbomb(int snum) { auto p = &ps[snum]; HitInfo hit{}; + double vel = 1024, zvel = 0; + setFreeAimVelocity(vel, zvel, p->horizon.sum(), 16.); - hitscan(p->pos, p->cursector, DVector3(p->angle.ang.ToVector() * 1024, p->horizon.sum().Tan() * 16.), hit, CLIPMASK1); + hitscan(p->pos, p->cursector, DVector3(p->angle.ang.ToVector() * vel, zvel), hit, CLIPMASK1); if (hit.hitSector == nullptr || hit.actor()) return 0;