Plugin forwards for convar changes are no longer called if the new and old values are the same

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40500
This commit is contained in:
Scott Ehlert 2007-02-14 23:44:40 +00:00
parent 7a8152aba3
commit 06b9b09ea6

View File

@ -372,6 +372,13 @@ void CConVarManager::UnhookConVarChange(IPluginContext *pContext, ConVar *cvar,
void CConVarManager::OnConVarChanged(ConVar *cvar, const char *oldValue)
{
// If the values are the same...
if (strcmp(cvar->GetString(), oldValue) == 0)
{
// Exit early in order to not trigger callbacks
return;
}
Trie *cache = g_ConVarManager.GetConVarCache();
ConVarInfo *info;