From 2f4f8090a7231ae762bf538cb2880d3880568848 Mon Sep 17 00:00:00 2001 From: mittorn Date: Wed, 18 Jan 2017 21:37:52 +0000 Subject: [PATCH] Remove wrong nickname changed message in coop --- dlls/client.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/client.cpp b/dlls/client.cpp index ca0c67da..b9ade580 100644 --- a/dlls/client.cpp +++ b/dlls/client.cpp @@ -610,6 +610,10 @@ void ClientUserInfoChanged( edict_t *pEntity, char *infobuffer ) // Set the name g_engfuncs.pfnSetClientKeyValue( ENTINDEX(pEntity), infobuffer, "name", sName ); + // prevent phantom nickname changed messages + if( mp_coop.value && ((CBasePlayer *)pEntity->pvPrivateData)->m_state == STATE_UNINITIALIZED ) + return; + char text[256]; snprintf( text, 256, "* %s changed name to %s\n", STRING(pEntity->v.netname), g_engfuncs.pfnInfoKeyValue( infobuffer, "name" ) ); MESSAGE_BEGIN( MSG_ALL, gmsgSayText, NULL );