diff -r eb4ad6f28c7d -r 76b7b4575e21 core/CoreConfig.cpp --- a/core/CoreConfig.cpp Fri Nov 14 03:38:59 2008 -0600 +++ b/core/CoreConfig.cpp Fri Nov 14 09:18:30 2008 -0600 @@ -61,7 +61,7 @@ void CheckAndFinalizeConfigs(); -#if defined ORANGEBOX_BUILD +#if SOURCE_ENGINE >= SE_ORANGEBOX SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &); void Hook_ExecDispatchPre(const CCommand &cmd) #else @@ -70,7 +70,7 @@ void Hook_ExecDispatchPre() #endif { -#if !defined ORANGEBOX_BUILD +#if SOURCE_ENGINE == SE_EPISODEONE CCommand cmd; #endif @@ -84,7 +84,7 @@ } } -#if defined ORANGEBOX_BUILD +#if SOURCE_ENGINE >= SE_ORANGEBOX void Hook_ExecDispatchPost(const CCommand &cmd) #else void Hook_ExecDispatchPost() @@ -103,7 +103,7 @@ if ((g_bServerExecd || g_ServerCfgFile == NULL) && g_bGotServerStart) { -#if defined ORANGEBOX_BUILD +#if SOURCE_ENGINE >= SE_ORANGEBOX g_PendingInternalPush = true; #else SM_InternalCmdTrigger(); @@ -151,17 +151,7 @@ if (g_ServerCfgFile != NULL) { - ConCommandBase *pBase = icvar->GetCommands(); - while (pBase != NULL) - { - if (pBase->IsCommand() && strcmp(pBase->GetName(), "exec") == 0) - { - break; - } - pBase = const_cast(pBase->GetNext()); - } - - g_pExecPtr = (ConCommand *)pBase; + g_pExecPtr = FindCommand("exec"); if (g_pExecPtr != NULL) { SH_ADD_HOOK_STATICFUNC(ConCommand, Dispatch, g_pExecPtr, Hook_ExecDispatchPre, false);