Now compiles against hl2sdk-l4d as-is as well as the OB SDK still
authorScott Ehlert <ds@alliedmods.net>
Sun Nov 09 04:03:17 2008 -0600 (2008-11-09)
changeset 535d8223f943a86
parent 534 eb2d7d18441c
child 536 f38702d3d680
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.
sourcemm/episode2/vsp_listener.cpp
     1.1 --- a/sourcemm/episode2/vsp_listener.cpp	Tue Oct 14 23:31:05 2008 -0700
     1.2 +++ b/sourcemm/episode2/vsp_listener.cpp	Sun Nov 09 04:03:17 2008 -0600
     1.3 @@ -213,16 +213,7 @@
     1.4  		InitializeGlobals(interfaceFactory, interfaceFactory, interfaceFactory, pGlobals);
     1.5  		StartupMetamod(true);
     1.6  		
     1.7 -		const ConCommandBase *pBase = icvar->GetCommands();
     1.8 -		while (pBase != NULL)
     1.9 -		{
    1.10 -			if (pBase->IsCommand() && strcmp(pBase->GetName(), "plugin_unload") == 0)
    1.11 -			{
    1.12 -				g_plugin_unload = (ConCommand *)pBase;
    1.13 -				break;
    1.14 -			}
    1.15 -			pBase = pBase->GetNext();
    1.16 -		}
    1.17 +		g_plugin_unload = icvar->FindCommand("plugin_unload");
    1.18  
    1.19  		if (g_plugin_unload != NULL)
    1.20  		{