core/sourcemod.cpp
changeset 496 a16c05dcf584
parent 484 d254e257cac2
child 520 7676d61cde2d
     1.1 --- a/core/sourcemod.cpp	Thu Feb 15 01:02:34 2007 +0000
     1.2 +++ b/core/sourcemod.cpp	Thu Feb 15 20:35:17 2007 +0000
     1.3 @@ -156,6 +156,8 @@
     1.4  	SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, gamedll, this, &SourceModBase::LevelShutdown, false);
     1.5  	SH_ADD_HOOK_MEMFUNC(IServerGameDLL, GameFrame, gamedll, this, &SourceModBase::GameFrame, false);
     1.6  
     1.7 +	enginePatch = SH_GET_CALLCLASS(engine);
     1.8 +
     1.9  	/* Notify! */
    1.10  	SMGlobalClass *pBase = SMGlobalClass::head;
    1.11  	while (pBase)
    1.12 @@ -314,6 +316,12 @@
    1.13  		pBase = pBase->m_pGlobalClassNext;
    1.14  	}
    1.15  
    1.16 +	if (enginePatch)
    1.17 +	{
    1.18 +		SH_RELEASE_CALLCLASS(enginePatch);
    1.19 +		enginePatch = NULL;
    1.20 +	}
    1.21 +
    1.22  	SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelInit, gamedll, this, &SourceModBase::LevelInit, false);
    1.23  	SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelShutdown, gamedll, this, &SourceModBase::LevelShutdown, false);
    1.24  	SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, GameFrame, gamedll, this, &SourceModBase::GameFrame, false);