SMGlobalClass unloads now

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40294
This commit is contained in:
Borja Ferrer 2007-01-13 04:28:13 +00:00
parent eea576cb52
commit e13c228c5a
4 changed files with 29 additions and 1 deletions

View File

@ -7,5 +7,5 @@ things to do for a release, in priority
X add debugging output to logger
- finish ML api, expose through interface
X add error messages to format routine
- finish global unloading
X finish global unloading
- add hex format specifier

View File

@ -23,6 +23,7 @@ bool SourceMod_Core::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen
bool SourceMod_Core::Unload(char *error, size_t maxlen)
{
g_SourceMod.CloseSourceMod();
return true;
}

View File

@ -187,6 +187,28 @@ void SourceModBase::DoGlobalPluginLoads()
g_PluginSys.LoadAll_SecondPass();
}
void SourceModBase::CloseSourceMod()
{
/* Notify! */
SMGlobalClass *pBase = SMGlobalClass::head;
while (pBase)
{
pBase->OnSourceModShutdown();
pBase = pBase->m_pGlobalClassNext;
}
/* Notify! */
pBase = SMGlobalClass::head;
while (pBase)
{
pBase->OnSourceModAllShutdown();
pBase = pBase->m_pGlobalClassNext;
}
/* Rest In Peace */
ShutdownJIT();
}
bool SourceModBase::IsLateLoadInMap()
{
return m_IsLateLoadInMap;

View File

@ -22,6 +22,11 @@ public:
*/
void StartSourceMod(bool late);
/**
* @brief Shuts down all SourceMod components
*/
void CloseSourceMod();
/**
* @brief Map change hook
*/