Allow immediately change name for proxy

This commit is contained in:
s1lent 2019-08-11 20:20:21 +07:00
parent 3202d6d99c
commit 594721ccef
No known key found for this signature in database
GPG Key ID: 0FE401DC73916B5C

View File

@ -164,6 +164,15 @@ LINK_HOOK_CLASS_CHAIN(bool, CBasePlayer, SetClientUserInfoName, (char *infobuffe
bool EXT_FUNC CBasePlayer::__API_HOOK(SetClientUserInfoName)(char *infobuffer, char *szNewName)
{
int nClientIndex = entindex();
#ifdef REGAMEDLL_FIXES
if (IsProxy())
{
SET_CLIENT_KEY_VALUE(nClientIndex, infobuffer, "name", szNewName);
return true;
}
#endif
if (pev->deadflag != DEAD_NO)
{
m_bHasChangedName = true;