Networking: Make sure level transitions don't miss player entity setup

packets
This commit is contained in:
Marco Cawthorne 2019-09-08 12:59:17 +02:00
parent b447628a97
commit e64bc2ca8e
3 changed files with 8 additions and 22 deletions

View File

@ -58,7 +58,7 @@ void Game_PlayerPostThink(void)
player pl = (player)self;
Animation_PlayerUpdate();
pl.SendFlags = PLAYER_KEEPALIVE;
pl.SendFlags |= PLAYER_KEEPALIVE;
if (pl.old_modelindex != pl.modelindex)
pl.SendFlags |= PLAYER_MODELINDEX;
@ -191,26 +191,7 @@ void Game_PutClientInServer(void)
pl.velocity = [0,0,0];
pl.frame = 1;
pl.SendEntity = Player_SendEntity;
pl.SendFlags = PLAYER_MODELINDEX |
PLAYER_ORIGIN |
PLAYER_ORIGIN_Z |
PLAYER_ANGLES_X |
PLAYER_ANGLES_Y |
PLAYER_ANGLES_Z |
PLAYER_VELOCITY |
PLAYER_VELOCITY_Z |
PLAYER_FLAGS |
PLAYER_WEAPON |
PLAYER_ITEMS |
PLAYER_HEALTH |
PLAYER_ARMOR |
PLAYER_MOVETYPE |
PLAYER_VIEWOFS |
PLAYER_BASEFRAME |
PLAYER_FRAME |
PLAYER_AMMO1 |
PLAYER_AMMO2 |
PLAYER_AMMO3;
pl.SendFlags = UPDATE_ALL;
pl.customphysics = Empty;
pl.vPain = Player_Pain;

View File

@ -68,7 +68,7 @@ Game_PlayerPostThink(void)
player pl = (player)self;
Animation_PlayerUpdate();
pl.SendFlags = PLAYER_KEEPALIVE;
pl.SendFlags |= PLAYER_KEEPALIVE;
if (pl.old_modelindex != pl.modelindex) {
pl.SendFlags |= PLAYER_MODELINDEX;
@ -177,6 +177,7 @@ Game_DecodeChangeParms(void)
pl.g_items = parm10;
pl.activeweapon = parm11;
}
void
Game_SetChangeParms(void)
{
@ -228,6 +229,8 @@ Game_PutClientInServer(void)
pl.velocity = [0,0,0];
pl.frame = 1;
pl.SendEntity = Player_SendEntity;
pl.SendFlags = UPDATE_ALL;
pl.customphysics = Empty;
pl.vPain = Player_Pain;
pl.vDeath = Player_Death;

View File

@ -66,6 +66,8 @@ const vector VEC_PLAYER_CVIEWPOS = [0,0,12];
#define FL_FROZEN (1<<21)
#define FL_ONLADDER (1<<13)
#define UPDATE_ALL 16777215
/* global hitmesh definitions */
enum {
BODY_DEFAULT,