core/CoreConfig.cpp
changeset 2065 e2e5445a2f9b
parent 1952 b7aa2b626807
child 2166 b2594457bad1
     1.1 --- a/core/CoreConfig.cpp	Tue May 20 09:45:13 2008 +0000
     1.2 +++ b/core/CoreConfig.cpp	Wed May 21 02:12:12 2008 +0000
     1.3 @@ -49,6 +49,7 @@
     1.4  
     1.5  IForward *g_pOnServerCfg = NULL;
     1.6  IForward *g_pOnConfigsExecuted = NULL;
     1.7 +IForward *g_pOnAutoConfigsBuffered = NULL;
     1.8  CoreConfig g_CoreConfig;
     1.9  bool g_bConfigsExecd = false;
    1.10  
    1.11 @@ -57,6 +58,7 @@
    1.12  	g_RootMenu.AddRootConsoleCommand("config", "Set core configuration options", this);
    1.13  	g_pOnServerCfg = g_Forwards.CreateForward("OnServerCfg", ET_Ignore, 0, NULL);
    1.14  	g_pOnConfigsExecuted = g_Forwards.CreateForward("OnConfigsExecuted", ET_Ignore, 0, NULL);
    1.15 +	g_pOnAutoConfigsBuffered = g_Forwards.CreateForward("OnAutoConfigsBuffered", ET_Ignore, 0, NULL);
    1.16  }
    1.17  
    1.18  void CoreConfig::OnSourceModShutdown()
    1.19 @@ -64,6 +66,7 @@
    1.20  	g_RootMenu.RemoveRootConsoleCommand("config", this);
    1.21  	g_Forwards.ReleaseForward(g_pOnServerCfg);
    1.22  	g_Forwards.ReleaseForward(g_pOnConfigsExecuted);
    1.23 +	g_Forwards.ReleaseForward(g_pOnAutoConfigsBuffered);
    1.24  }
    1.25  
    1.26  void CoreConfig::OnSourceModLevelChange(const char *mapName)
    1.27 @@ -403,6 +406,8 @@
    1.28  	}
    1.29  	iter->Release();
    1.30  
    1.31 +	g_pOnAutoConfigsBuffered->Execute(NULL);
    1.32 +
    1.33  	engine->ServerCommand("sm internal 1\n");
    1.34  }
    1.35