Merge pull request #397 from alliedmodders/rm-old-mms

Remove code that handles long-dead Metamod:Source versions.
This commit is contained in:
David Anderson
2015-09-18 14:38:52 -07:00
18 changed files with 72 additions and 521 deletions
+4 -8
View File
@@ -67,7 +67,7 @@ void ConCmdManager::OnSourceModShutdown()
rootmenu->RemoveRootConsoleCommand("cmds", this);
}
void ConCmdManager::OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name, bool is_read_safe)
void ConCmdManager::OnUnlinkConCommandBase(ConCommandBase *pBase, const char *name)
{
/* Whoa, first get its information struct */
ConCmdInfo *pInfo;
@@ -102,7 +102,7 @@ void ConCmdManager::OnUnlinkConCommandBase(ConCommandBase *pBase, const char *na
delete hook;
}
RemoveConCmd(pInfo, name, is_read_safe, false);
RemoveConCmd(pInfo, name, false);
}
void ConCmdManager::OnPluginDestroyed(IPlugin *plugin)
@@ -121,7 +121,7 @@ void ConCmdManager::OnPluginDestroyed(IPlugin *plugin)
hook->admin->group->hooks.remove(hook);
if (hook->info->hooks.empty())
RemoveConCmd(hook->info, hook->info->pCmd->GetName(), true, true);
RemoveConCmd(hook->info, hook->info->pCmd->GetName(), true);
iter = pList->erase(iter);
delete hook;
@@ -502,7 +502,7 @@ void ConCmdManager::UpdateAdminCmdFlags(const char *cmd, OverrideType type, Flag
}
}
void ConCmdManager::RemoveConCmd(ConCmdInfo *info, const char *name, bool is_read_safe, bool untrack)
void ConCmdManager::RemoveConCmd(ConCmdInfo *info, const char *name, bool untrack)
{
/* Remove from the trie */
m_Cmds.remove(name);
@@ -525,10 +525,6 @@ void ConCmdManager::RemoveConCmd(ConCmdInfo *info, const char *name, bool is_rea
}
else
{
// If it's not safe to read the pointer, we zap the SourceHook hook so it
// doesn't attempt to access the pointer's vtable.
if (!is_read_safe)
info->sh_hook->Zap();
if (untrack)
UntrackConCommandBase(info->pCmd, this);
}