diff --git a/source/rr/src/player.cpp b/source/rr/src/player.cpp index e12a3854e..6194e7989 100644 --- a/source/rr/src/player.cpp +++ b/source/rr/src/player.cpp @@ -3273,9 +3273,9 @@ void P_GetInput(int const playerNum) input.fvel -= info.dz * keyMove / analogExtent; auto const currentHiTicks = timerGetHiTicks(); - double const elapsedInputTicks = currentHiTicks - pPlayer->lastInputTicks; + double const elapsedInputTicks = currentHiTicks - thisPlayer.lastInputTicks; - pPlayer->lastInputTicks = currentHiTicks; + thisPlayer.lastInputTicks = currentHiTicks; if (elapsedInputTicks == currentHiTicks) return; @@ -3671,9 +3671,9 @@ void P_GetInputMotorcycle(int playerNum) input.fvel -= info.dz * keyMove / analogExtent; auto const currentHiTicks = timerGetHiTicks(); - double const elapsedInputTicks = currentHiTicks - pPlayer->lastInputTicks; + double const elapsedInputTicks = currentHiTicks - thisPlayer.lastInputTicks; - pPlayer->lastInputTicks = currentHiTicks; + thisPlayer.lastInputTicks = currentHiTicks; if (elapsedInputTicks == currentHiTicks) return; @@ -3925,9 +3925,9 @@ void P_GetInputBoat(int playerNum) input.fvel -= info.dz * keyMove / analogExtent; auto const currentHiTicks = timerGetHiTicks(); - double const elapsedInputTicks = currentHiTicks - pPlayer->lastInputTicks; + double const elapsedInputTicks = currentHiTicks - thisPlayer.lastInputTicks; - pPlayer->lastInputTicks = currentHiTicks; + thisPlayer.lastInputTicks = currentHiTicks; if (elapsedInputTicks == currentHiTicks) return; @@ -4190,9 +4190,9 @@ void P_DHGetInput(int const playerNum) input.fvel -= info.dz * keyMove / analogExtent; auto const currentHiTicks = timerGetHiTicks(); - double const elapsedInputTicks = currentHiTicks - pPlayer->lastInputTicks; + double const elapsedInputTicks = currentHiTicks - thisPlayer.lastInputTicks; - pPlayer->lastInputTicks = currentHiTicks; + thisPlayer.lastInputTicks = currentHiTicks; if (elapsedInputTicks == currentHiTicks) return; diff --git a/source/rr/src/player.h b/source/rr/src/player.h index cd6d357c8..d89515423 100644 --- a/source/rr/src/player.h +++ b/source/rr/src/player.h @@ -223,7 +223,7 @@ typedef struct { int32_t drug_timer; int32_t sea_sick; uint8_t hurt_delay2, nocheat; - double tilt_status, lastInputTicks; + double tilt_status; int32_t dhat60f, dhat613, dhat617, dhat61b, dhat61f; @@ -242,6 +242,7 @@ typedef struct int8_t horizSkew; bool lookLeft; bool lookRight; + double lastInputTicks; int32_t movefifoend, syncvalhead, myminlag; int32_t pcolor, pteam; diff --git a/source/rr/src/premap.cpp b/source/rr/src/premap.cpp index 467935c20..f75828b44 100644 --- a/source/rr/src/premap.cpp +++ b/source/rr/src/premap.cpp @@ -2471,7 +2471,7 @@ int G_EnterLevel(int gameMode) renderFlushPerms(); // reset lastInputTicks. - g_player[myconnectindex].ps->lastInputTicks = 0; + g_player[myconnectindex].lastInputTicks = 0; everyothertime = 0; g_globalRandom = 0;