From abb23a7bd0efa0c8c9cfa6e60d6a167e43fd5484 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Sun, 2 Aug 2020 15:36:45 +1000 Subject: [PATCH] - fix remaining interpolation issue with weapon swaying when taking off again from a stand-still. --- source/games/duke/src/player_d.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/games/duke/src/player_d.cpp b/source/games/duke/src/player_d.cpp index 9a75c03b6..7116ad459 100644 --- a/source/games/duke/src/player_d.cpp +++ b/source/games/duke/src/player_d.cpp @@ -2741,7 +2741,15 @@ void processinput_d(int snum) p->weapon_sway += 96; else p->oweapon_sway = p->weapon_sway = 1024; } - else p->weapon_sway = p->bobcounter; + else + { + p->weapon_sway = p->bobcounter; + + if ((p->bobcounter - p->oweapon_sway) > 256) + { + p->oweapon_sway = p->weapon_sway; + } + } s->xvel = ksqrt((p->posx - p->bobposx) * (p->posx - p->bobposx) + (p->posy - p->bobposy) * (p->posy - p->bobposy));