From f94b38b13838e5ae8b90ba0c8a5e08efd5964f90 Mon Sep 17 00:00:00 2001 From: NY00123 Date: Fri, 22 May 2020 02:29:32 +0300 Subject: [PATCH] SW: Modify getinput to update oq16ang/oq16horiz with the same amount of change that camq16ang/camq16horiz gets. Such an update is possible after making sure that UpdateInputs (faketimerhandler) is never called from domovethings. # Conflicts: # source/sw/src/game.cpp --- source/sw/src/game.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/sw/src/game.cpp b/source/sw/src/game.cpp index 9d3c23b53..d0efe4804 100644 --- a/source/sw/src/game.cpp +++ b/source/sw/src/game.cpp @@ -3287,10 +3287,14 @@ getinput(SW_PACKET *loc, SWBOOL tied) } else { + fix16_t prevcamq16ang = pp->camq16ang, prevcamq16horiz = pp->camq16horiz; + if (TEST(pp->Flags2, PF2_INPUT_CAN_TURN)) DoPlayerTurn(pp, &pp->camq16ang, q16angvel); if (TEST(pp->Flags2, PF2_INPUT_CAN_AIM)) DoPlayerHorizon(pp, &pp->camq16horiz, q16aimvel); + pp->oq16ang += pp->camq16ang - prevcamq16ang; + pp->oq16horiz += pp->camq16horiz - prevcamq16horiz; } loc->vel += vel;