Networking: Add keepalive packet for players, so that prediction doesn't break.
This commit is contained in:
parent
4da3cf5079
commit
875dc52c96
3 changed files with 5 additions and 0 deletions
|
@ -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])
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ enumflags {
|
|||
};
|
||||
|
||||
enumflags {
|
||||
PLAYER_KEEPALIVE,
|
||||
PLAYER_MODELINDEX,
|
||||
PLAYER_ORIGIN,
|
||||
PLAYER_ORIGIN_Z,
|
||||
|
|
Loading…
Reference in a new issue