1.1 --- a/core/sourcemod.cpp Wed May 02 17:45:09 2007 +0000
1.2 +++ b/core/sourcemod.cpp Wed May 02 17:49:23 2007 +0000
1.3 @@ -45,6 +45,7 @@
1.4 float g_LastTime = 0.0f;
1.5 float g_LastAuthCheck = 0.0f;
1.6 IForward *g_pOnGameFrame = NULL;
1.7 +IForward *g_pOnMapEnd = NULL;
1.8 bool g_Loaded = false;
1.9
1.10 typedef int (*GIVEENGINEPOINTER)(ISourcePawnEngine *);
1.11 @@ -288,6 +289,11 @@
1.12 g_pOnGameFrame = g_Forwards.CreateForward("OnGameFrame", ET_Ignore, 0, NULL);
1.13 }
1.14
1.15 + if (!g_pOnMapEnd)
1.16 + {
1.17 + g_pOnMapEnd = g_Forwards.CreateForward("OnMapEnd", ET_Ignore, 0, NULL);
1.18 + }
1.19 +
1.20 RETURN_META_VALUE(MRES_IGNORED, true);
1.21 }
1.22
1.23 @@ -319,6 +325,11 @@
1.24
1.25 void SourceModBase::LevelShutdown()
1.26 {
1.27 + if (g_pOnMapEnd)
1.28 + {
1.29 + g_pOnMapEnd->Execute(NULL);
1.30 + }
1.31 +
1.32 if (m_ExecPluginReload)
1.33 {
1.34 g_PluginSys.ReloadOrUnloadPlugins();
1.35 @@ -396,6 +407,11 @@
1.36 {
1.37 g_Forwards.ReleaseForward(g_pOnGameFrame);
1.38 }
1.39 +
1.40 + if (g_pOnMapEnd)
1.41 + {
1.42 + g_Forwards.ReleaseForward(g_pOnMapEnd);
1.43 + }
1.44
1.45 /* Notify! */
1.46 SMGlobalClass *pBase = SMGlobalClass::head;