Commit ac45341a authored by NY00123's avatar NY00123 Committed by Evan Ramos
Browse files

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.
parent f0e94f09
......@@ -5363,12 +5363,15 @@ getinput(SW_PACKET *loc, SWBOOL tied)
fix16_t prevcamq16ang = pp->camq16ang, prevcamq16horiz = pp->camq16horiz;
void DoPlayerTurn(PLAYERp pp, fix16_t *pq16ang, fix16_t q16angvel);
void DoPlayerHorizon(PLAYERp pp, fix16_t *pq16horiz, fix16_t q16aimvel);
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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment