Skip to content

Commit

Permalink
Added check in ClientUserInfoChanged that client was connected (spawn…
Browse files Browse the repository at this point in the history
…ed).
  • Loading branch information
LevShisterov committed Jun 20, 2012
1 parent 8a5ee27 commit 8668d11
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions dlls/client.cpp
Expand Up @@ -479,6 +479,10 @@ void ClientUserInfoChanged( edict_t *pEntity, char *infobuffer )
if ( !pEntity->pvPrivateData )
return;

CBasePlayer *pPlayer = GetClassPtr((CBasePlayer *)&pEntity->v);
if (!pPlayer->IsConnected())
return;

// msg everyone if someone changes their name, and it isn't the first time (changing no name to current name)
if ( pEntity->v.netname && STRING(pEntity->v.netname)[0] != 0 && !FStrEq( STRING(pEntity->v.netname), g_engfuncs.pfnInfoKeyValue( infobuffer, "name" )) )
{
Expand Down

0 comments on commit 8668d11

Please sign in to comment.