mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-12 08:08:02 +00:00
engine: client: fix userid not being written to player info on userinfo change
This commit is contained in:
parent
2feaae59f7
commit
85de61ebc8
@ -1382,9 +1382,13 @@ void CL_UpdateUserinfo( sizebuf_t *msg, qboolean legacy )
|
|||||||
if( slot >= MAX_CLIENTS )
|
if( slot >= MAX_CLIENTS )
|
||||||
Host_Error( "CL_ParseServerMessage: svc_updateuserinfo >= MAX_CLIENTS\n" );
|
Host_Error( "CL_ParseServerMessage: svc_updateuserinfo >= MAX_CLIENTS\n" );
|
||||||
|
|
||||||
|
player = &cl.players[slot];
|
||||||
|
|
||||||
if( !legacy )
|
if( !legacy )
|
||||||
id = MSG_ReadLong( msg ); // unique user ID
|
id = MSG_ReadLong( msg ); // unique user ID
|
||||||
player = &cl.players[slot];
|
else
|
||||||
|
id = 0; // bogus
|
||||||
|
|
||||||
active = MSG_ReadOneBit( msg ) ? true : false;
|
active = MSG_ReadOneBit( msg ) ? true : false;
|
||||||
|
|
||||||
if( active )
|
if( active )
|
||||||
@ -1406,6 +1410,10 @@ void CL_UpdateUserinfo( sizebuf_t *msg, qboolean legacy )
|
|||||||
|
|
||||||
memset( player, 0, sizeof( *player ));
|
memset( player, 0, sizeof( *player ));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// in GoldSrc userinfo might be empty but userid is always sent as separate value
|
||||||
|
// thus avoids clean up even after client disconnect
|
||||||
|
player->userid = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user