From 13839fc3e949cf196c6e0c1531b3cf1a17128813 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Thu, 12 Nov 2020 22:07:16 +1100 Subject: [PATCH] - Duke: Fix `shootstuff()` zvel calculation error following changes in badf536fef9378e19f62408e98c5c1d54a1f72d9. * Fixes #177. --- source/games/duke/src/player_d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 4d721ed50..a5e701e6c 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -603,7 +603,7 @@ static void shootstuff(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, int j = findplayer(actor, &x); // sa = getangle(ps[j].oposx-sx,ps[j].oposy-sy); sa += 16 - (krand() & 31); - zvel = (((ps[j].oposz - sz + (3 << 8))) * vel) / ldist(ps[p].GetActor(), actor); + zvel = (((ps[j].oposz - sz + (3 << 8))) * vel) / ldist(ps[j].GetActor(), actor); } int oldzvel = zvel;