Add OnNotifyPluginUnloaded forward
This commit is contained in:
parent
ff43e60831
commit
62142197c1
@ -1505,6 +1505,9 @@ void CPluginManager::Purge(CPlugin *plugin)
|
|||||||
(*iter)->OnPluginUnloaded(plugin);
|
(*iter)->OnPluginUnloaded(plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
m_pOnNotifyPluginUnloaded->PushCell(plugin->GetMyHandle());
|
||||||
|
m_pOnNotifyPluginUnloaded->Execute(NULL);
|
||||||
|
|
||||||
plugin->DropEverything();
|
plugin->DropEverything();
|
||||||
|
|
||||||
for (ListenerIter iter(m_listeners); !iter.done(); iter.next())
|
for (ListenerIter iter(m_listeners); !iter.done(); iter.next())
|
||||||
@ -1587,6 +1590,7 @@ void CPluginManager::OnSourceModAllInitialized()
|
|||||||
|
|
||||||
m_pOnLibraryAdded = forwardsys->CreateForward("OnLibraryAdded", ET_Ignore, 1, NULL, Param_String);
|
m_pOnLibraryAdded = forwardsys->CreateForward("OnLibraryAdded", ET_Ignore, 1, NULL, Param_String);
|
||||||
m_pOnLibraryRemoved = forwardsys->CreateForward("OnLibraryRemoved", ET_Ignore, 1, NULL, Param_String);
|
m_pOnLibraryRemoved = forwardsys->CreateForward("OnLibraryRemoved", ET_Ignore, 1, NULL, Param_String);
|
||||||
|
m_pOnNotifyPluginUnloaded = forwardsys->CreateForward("OnNotifyPluginUnloaded", ET_Ignore, 1, NULL, Param_Cell);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPluginManager::OnSourceModShutdown()
|
void CPluginManager::OnSourceModShutdown()
|
||||||
@ -1601,6 +1605,7 @@ void CPluginManager::OnSourceModShutdown()
|
|||||||
|
|
||||||
forwardsys->ReleaseForward(m_pOnLibraryAdded);
|
forwardsys->ReleaseForward(m_pOnLibraryAdded);
|
||||||
forwardsys->ReleaseForward(m_pOnLibraryRemoved);
|
forwardsys->ReleaseForward(m_pOnLibraryRemoved);
|
||||||
|
forwardsys->ReleaseForward(m_pOnNotifyPluginUnloaded);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigResult CPluginManager::OnSourceModConfigChanged(const char *key,
|
ConfigResult CPluginManager::OnSourceModConfigChanged(const char *key,
|
||||||
|
@ -523,6 +523,7 @@ private:
|
|||||||
// Forwards
|
// Forwards
|
||||||
IForward *m_pOnLibraryAdded;
|
IForward *m_pOnLibraryAdded;
|
||||||
IForward *m_pOnLibraryRemoved;
|
IForward *m_pOnLibraryRemoved;
|
||||||
|
IForward *m_pOnNotifyPluginUnloaded;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern CPluginManager g_PluginSys;
|
extern CPluginManager g_PluginSys;
|
||||||
|
@ -496,6 +496,13 @@ forward void OnLibraryAdded(const char[] name);
|
|||||||
*/
|
*/
|
||||||
forward void OnLibraryRemoved(const char[] name);
|
forward void OnLibraryRemoved(const char[] name);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called when a plugin unloaded.
|
||||||
|
*
|
||||||
|
* @param plugin Plugin Handle who unloaded.
|
||||||
|
*/
|
||||||
|
forward void OnNotifyPluginUnloaded(Handle plugin);
|
||||||
|
|
||||||
#define MAPLIST_FLAG_MAPSFOLDER (1<<0) /**< On failure, use all maps in the maps folder. */
|
#define MAPLIST_FLAG_MAPSFOLDER (1<<0) /**< On failure, use all maps in the maps folder. */
|
||||||
#define MAPLIST_FLAG_CLEARARRAY (1<<1) /**< If an input array is specified, clear it before adding. */
|
#define MAPLIST_FLAG_CLEARARRAY (1<<1) /**< If an input array is specified, clear it before adding. */
|
||||||
#define MAPLIST_FLAG_NO_DEFAULT (1<<2) /**< Do not read "default" or "mapcyclefile" on failure. */
|
#define MAPLIST_FLAG_NO_DEFAULT (1<<2) /**< Do not read "default" or "mapcyclefile" on failure. */
|
||||||
|
Loading…
Reference in New Issue
Block a user