core/CoreConfig.cpp
changeset 2400 76b7b4575e21
parent 2335 cf312a67fb8f
child 2479 44e8e76d4e53
     1.1 --- a/core/CoreConfig.cpp	Fri Nov 14 03:38:59 2008 -0600
     1.2 +++ b/core/CoreConfig.cpp	Fri Nov 14 09:18:30 2008 -0600
     1.3 @@ -61,7 +61,7 @@
     1.4  
     1.5  void CheckAndFinalizeConfigs();
     1.6  
     1.7 -#if defined ORANGEBOX_BUILD
     1.8 +#if SOURCE_ENGINE >= SE_ORANGEBOX
     1.9  SH_DECL_EXTERN1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &);
    1.10  void Hook_ExecDispatchPre(const CCommand &cmd)
    1.11  #else
    1.12 @@ -70,7 +70,7 @@
    1.13  void Hook_ExecDispatchPre()
    1.14  #endif
    1.15  {
    1.16 -#if !defined ORANGEBOX_BUILD
    1.17 +#if SOURCE_ENGINE == SE_EPISODEONE
    1.18  	CCommand cmd;
    1.19  #endif
    1.20  
    1.21 @@ -84,7 +84,7 @@
    1.22  	}
    1.23  }
    1.24  
    1.25 -#if defined ORANGEBOX_BUILD
    1.26 +#if SOURCE_ENGINE >= SE_ORANGEBOX
    1.27  void Hook_ExecDispatchPost(const CCommand &cmd)
    1.28  #else
    1.29  void Hook_ExecDispatchPost()
    1.30 @@ -103,7 +103,7 @@
    1.31  	if ((g_bServerExecd || g_ServerCfgFile == NULL) 
    1.32  		&& g_bGotServerStart)
    1.33  	{
    1.34 -#if defined ORANGEBOX_BUILD
    1.35 +#if SOURCE_ENGINE >= SE_ORANGEBOX
    1.36          g_PendingInternalPush = true;
    1.37  #else
    1.38          SM_InternalCmdTrigger();
    1.39 @@ -151,17 +151,7 @@
    1.40  
    1.41  		if (g_ServerCfgFile != NULL)
    1.42  		{
    1.43 -			ConCommandBase *pBase = icvar->GetCommands();
    1.44 -			while (pBase != NULL)
    1.45 -			{
    1.46 -				if (pBase->IsCommand() && strcmp(pBase->GetName(), "exec") == 0)
    1.47 -				{
    1.48 -					break;
    1.49 -				}
    1.50 -				pBase = const_cast<ConCommandBase *>(pBase->GetNext());
    1.51 -			}
    1.52 -
    1.53 -			g_pExecPtr = (ConCommand *)pBase;
    1.54 +			g_pExecPtr = FindCommand("exec");
    1.55  			if (g_pExecPtr != NULL)
    1.56  			{
    1.57  				SH_ADD_HOOK_STATICFUNC(ConCommand, Dispatch, g_pExecPtr, Hook_ExecDispatchPre, false);