mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-28 12:30:46 +00:00
RR: Move lastInputTicks from DukePlayer_t struct to PlayerData_t struct.
Better location for it since it never needs to be sent across the wire in a multiplayer situation. It's now also located where the other properties to do with input being tied to frame-rate are located.
This commit is contained in:
parent
1f807792af
commit
10142eee6b
3 changed files with 11 additions and 10 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue