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:
parent
7a8152aba3
commit
06b9b09ea6
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user