mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-30 13:21:04 +00:00
Duke3D: 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
22ae4182b5
commit
1f807792af
3 changed files with 5 additions and 6 deletions
|
@ -3135,9 +3135,9 @@ void P_GetInput(int const playerNum)
|
||||||
input.fvel -= info.dz * keyMove / analogExtent;
|
input.fvel -= info.dz * keyMove / analogExtent;
|
||||||
|
|
||||||
auto const currentHiTicks = timerGetHiTicks();
|
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)
|
if (elapsedInputTicks == currentHiTicks)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -213,8 +213,6 @@ typedef struct {
|
||||||
|
|
||||||
int8_t last_used_weapon;
|
int8_t last_used_weapon;
|
||||||
|
|
||||||
double lastInputTicks;
|
|
||||||
|
|
||||||
#ifdef LUNATIC
|
#ifdef LUNATIC
|
||||||
int8_t palsfadespeed, palsfadenext, palsfadeprio, padding2_;
|
int8_t palsfadespeed, palsfadenext, palsfadeprio, padding2_;
|
||||||
|
|
||||||
|
@ -224,7 +222,7 @@ typedef struct {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int8_t crouch_toggle;
|
int8_t crouch_toggle;
|
||||||
int8_t padding_[5];
|
int8_t padding_[1];
|
||||||
} DukePlayer_t;
|
} DukePlayer_t;
|
||||||
|
|
||||||
// KEEPINSYNC lunatic/_defs_game.lua
|
// KEEPINSYNC lunatic/_defs_game.lua
|
||||||
|
@ -238,6 +236,7 @@ typedef struct
|
||||||
int8_t horizSkew;
|
int8_t horizSkew;
|
||||||
bool lookLeft;
|
bool lookLeft;
|
||||||
bool lookRight;
|
bool lookRight;
|
||||||
|
double lastInputTicks;
|
||||||
|
|
||||||
int32_t netsynctime;
|
int32_t netsynctime;
|
||||||
int16_t ping, filler;
|
int16_t ping, filler;
|
||||||
|
|
|
@ -719,7 +719,6 @@ void P_ResetPlayer(int playerNum)
|
||||||
p.jumping_toggle = 0;
|
p.jumping_toggle = 0;
|
||||||
p.knee_incs = 0;
|
p.knee_incs = 0;
|
||||||
p.knuckle_incs = 1;
|
p.knuckle_incs = 1;
|
||||||
p.lastInputTicks = 0;
|
|
||||||
p.last_full_weapon = 0;
|
p.last_full_weapon = 0;
|
||||||
p.last_pissed_time = 0;
|
p.last_pissed_time = 0;
|
||||||
p.loogcnt = 0;
|
p.loogcnt = 0;
|
||||||
|
@ -781,6 +780,7 @@ void P_ResetPlayer(int playerNum)
|
||||||
g_player[playerNum].horizRecenter = 0;
|
g_player[playerNum].horizRecenter = 0;
|
||||||
g_player[playerNum].horizSkew = 0;
|
g_player[playerNum].horizSkew = 0;
|
||||||
g_player[playerNum].horizAngleAdjust = 0;
|
g_player[playerNum].horizAngleAdjust = 0;
|
||||||
|
g_player[playerNum].lastInputTicks = 0;
|
||||||
|
|
||||||
P_UpdateScreenPal(&p);
|
P_UpdateScreenPal(&p);
|
||||||
VM_OnEvent(EVENT_RESETPLAYER, p.i, playerNum);
|
VM_OnEvent(EVENT_RESETPLAYER, p.i, playerNum);
|
||||||
|
|
Loading…
Reference in a new issue