engine: client: fix svc_updateuserinfo for inactive player on GoldSrc servers

This commit is contained in:
Alibek Omarov 2024-10-26 05:13:22 +03:00
parent 8c93a0d247
commit 0a24ca3fe2

View file

@ -1506,9 +1506,15 @@ void CL_UpdateUserinfo( sizebuf_t *msg, connprotocol_t proto )
if( proto != PROTO_LEGACY ) if( proto != PROTO_LEGACY )
MSG_ReadBytes( msg, player->hashedcdkey, sizeof( player->hashedcdkey )); MSG_ReadBytes( msg, player->hashedcdkey, sizeof( player->hashedcdkey ));
if( slot == cl.playernum ) gameui.playerinfo = *player; if( proto == PROTO_GOLDSRC && ( !COM_CheckStringEmpty( player->userinfo ) || !COM_CheckStringEmpty( player->name )))
active = false;
if( active && slot == cl.playernum )
gameui.playerinfo = *player;
} }
else
if( !active )
{ {
COM_ClearCustomizationList( &player->customdata, true ); COM_ClearCustomizationList( &player->customdata, true );