name change doesn't persist between casual map changes. fixed??

This commit is contained in:
nullifiedcat 2017-05-02 19:50:34 +03:00
parent 7988469198
commit 7ddbd82c3c

View File

@ -301,6 +301,9 @@ void LevelInit_hook(void* thisptr, const char* newmap) {
ch->SendNetMsg(setname, false);
//name_cv->m_pszString = strfmt("%s", force_name.GetString());
}
static ConVar* name_cv = g_ICvar->FindVar("name");
name_cv->SetValue(force_name.GetString());
name_cv->m_pszString = (char*)strfmt("%s", force_name.GetString());
}
}
@ -325,6 +328,9 @@ void LevelShutdown_hook(void* thisptr) {
ch->SendNetMsg(setname, false);
//name_cv->m_pszString = strfmt("%s", force_name.GetString());
}
static ConVar* name_cv = g_ICvar->FindVar("name");
name_cv->SetValue(force_name.GetString());
name_cv->m_pszString = (char*)strfmt("%s", force_name.GetString());
}
}