mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-03-03 16:11:33 +00:00
- Improve player prediction
This commit is contained in:
parent
bb235ab572
commit
c89c63d9da
2 changed files with 3 additions and 1 deletions
|
@ -159,7 +159,7 @@ ticcmd_t NetClient::GetPlayerInput(int player) const
|
|||
|
||||
ticcmd_t NetClient::GetSentInput(int tic) const
|
||||
{
|
||||
return mCurrentInput[consoleplayer];
|
||||
return mSentInput[tic % BACKUPTICS];
|
||||
}
|
||||
|
||||
void NetClient::RunCommands(int player)
|
||||
|
@ -173,6 +173,7 @@ void NetClient::RunCommands(int player)
|
|||
void NetClient::WriteLocalInput(ticcmd_t cmd)
|
||||
{
|
||||
mCurrentInput[consoleplayer] = cmd;
|
||||
mSentInput[gametic % BACKUPTICS] = cmd;
|
||||
}
|
||||
|
||||
void NetClient::WriteBotInput(int player, const ticcmd_t &cmd)
|
||||
|
|
|
@ -62,6 +62,7 @@ private:
|
|||
int mSendTic = 0;
|
||||
|
||||
ticcmd_t mCurrentInput[MAXPLAYERS];
|
||||
ticcmd_t mSentInput[BACKUPTICS];
|
||||
FDynamicBuffer mCurrentCommands;
|
||||
FDynamicBuffer mSendCommands;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue