From 73477a722c654886e3f249a6696c0da1daeb43d6 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Tue, 11 Oct 2022 12:31:11 +1100 Subject: [PATCH] - Duke: Pitch-adjusted velocity for `shootshrinker()` 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 2a8ceaf83..ecf91032b 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -999,6 +999,7 @@ static void shootmortar(DDukeActor* actor, int p, const DVector3& pos, DAngle an static void shootshrinker(DDukeActor* actor, int p, const DVector3& pos, DAngle ang, int atwith) { + double vel = 48.; double zvel; if (actor->spr.extra >= 0) actor->spr.shade = -96; if (p >= 0) @@ -1012,7 +1013,7 @@ static void shootshrinker(DDukeActor* actor, int p, const DVector3& pos, DAngle ang = (aimed->spr.pos.XY() - pos.XY()).Angle(); } else - zvel = ps[p].horizon.sum().Tan() * 49.; + setFreeAimVelocity(vel, zvel, ps[p].horizon.sum(), 49.); } else if (actor->spr.statnum != 3) { @@ -1024,7 +1025,7 @@ static void shootshrinker(DDukeActor* actor, int p, const DVector3& pos, DAngle else zvel = 0; auto spawned = CreateActor(actor->sector(), - pos.plusZ(2) + ang.ToVector() * 0.25, SHRINKSPARK, -16, DVector2(0.4375, 0.4375), ang, 48., zvel, actor, 4); + pos.plusZ(2) + ang.ToVector() * 0.25, SHRINKSPARK, -16, DVector2(0.4375, 0.4375), ang, vel, zvel, actor, 4); if (spawned) {