Networking: Add keepalive packet for players, so that prediction doesn't break.

This commit is contained in:
Marco Cawthorne 2019-09-08 12:17:46 +02:00
parent 4da3cf5079
commit 875dc52c96
3 changed files with 5 additions and 0 deletions

View File

@ -58,6 +58,8 @@ void Game_PlayerPostThink(void)
player pl = (player)self;
Animation_PlayerUpdate();
pl.SendFlags = PLAYER_KEEPALIVE;
if (pl.old_modelindex != pl.modelindex)
pl.SendFlags |= PLAYER_MODELINDEX;
if (pl.old_origin[0] != pl.origin[0])

View File

@ -68,6 +68,8 @@ Game_PlayerPostThink(void)
player pl = (player)self;
Animation_PlayerUpdate();
pl.SendFlags = PLAYER_KEEPALIVE;
if (pl.old_modelindex != pl.modelindex) {
pl.SendFlags |= PLAYER_MODELINDEX;
}

View File

@ -44,6 +44,7 @@ enumflags {
};
enumflags {
PLAYER_KEEPALIVE,
PLAYER_MODELINDEX,
PLAYER_ORIGIN,
PLAYER_ORIGIN_Z,