1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-03-22 13:19:40 +01:00

Now compiles against hl2sdk-l4d as-is as well as the OB SDK still

Replaced block of code that searched for a command using ICvar::GetCommands() for enumeration.
Now uses ICvar::FindCommand which exists in both SDKs.
This commit is contained in:
Scott Ehlert 2008-11-09 04:03:17 -06:00
parent 03db50adbd
commit 23c82ec9ae

View File

@ -213,16 +213,7 @@ bool VSPListener::Load(CreateInterfaceFn interfaceFactory, CreateInterfaceFn gam
InitializeGlobals(interfaceFactory, interfaceFactory, interfaceFactory, pGlobals);
StartupMetamod(true);
const ConCommandBase *pBase = icvar->GetCommands();
while (pBase != NULL)
{
if (pBase->IsCommand() && strcmp(pBase->GetName(), "plugin_unload") == 0)
{
g_plugin_unload = (ConCommand *)pBase;
break;
}
pBase = pBase->GetNext();
}
g_plugin_unload = icvar->FindCommand("plugin_unload");
if (g_plugin_unload != NULL)
{