Oi, consistency...

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40432
This commit is contained in:
Scott Ehlert 2007-02-02 22:47:14 +00:00
parent 3efb158754
commit 02ffffe05a
3 changed files with 11 additions and 11 deletions

View File

@ -243,7 +243,7 @@ void CPlugin::UpdateInfo()
m_info.version = m_info.version ? m_info.version : ""; m_info.version = m_info.version ? m_info.version : "";
} }
void CPlugin::Call_OnPluginInit() void CPlugin::Call_OnPluginStart()
{ {
if (m_status != Plugin_Loaded) if (m_status != Plugin_Loaded)
{ {
@ -263,7 +263,7 @@ void CPlugin::Call_OnPluginInit()
pFunction->Execute(&result); pFunction->Execute(&result);
} }
void CPlugin::Call_OnPluginUnload() void CPlugin::Call_OnPluginEnd()
{ {
if (m_status < Plugin_Paused) if (m_status < Plugin_Paused)
{ {
@ -959,7 +959,7 @@ bool CPluginManager::RunSecondPass(CPlugin *pPlugin, char *error, size_t maxleng
} }
/* Tell this plugin to finish initializing itself */ /* Tell this plugin to finish initializing itself */
pPlugin->Call_OnPluginInit(); pPlugin->Call_OnPluginStart();
return true; return true;
} }
@ -1003,7 +1003,7 @@ bool CPluginManager::UnloadPlugin(IPlugin *plugin)
pListener->OnPluginUnloaded(pPlugin); pListener->OnPluginUnloaded(pPlugin);
} }
/* Notify plugin */ /* Notify plugin */
pPlugin->Call_OnPluginUnload(); pPlugin->Call_OnPluginEnd();
} }
for (iter=m_listeners.begin(); iter!=m_listeners.end(); iter++) for (iter=m_listeners.begin(); iter!=m_listeners.end(); iter++)

View File

@ -74,7 +74,7 @@ using namespace SourceHook;
* 6. If the plugin has failed to load at this point, any dynamic natives it has added are scrapped. * 6. If the plugin has failed to load at this point, any dynamic natives it has added are scrapped.
* Furthermore, any plugin that referenced these natives must now have pass 2 re-ran. * Furthermore, any plugin that referenced these natives must now have pass 2 re-ran.
* PASS THREE (not a real pass): * PASS THREE (not a real pass):
* 7. Once all plugins are deemed to be loaded, OnPluginInit() is called * 7. Once all plugins are deemed to be loaded, OnPluginStart() is called
*/ */
#define SM_CONTEXTVAR_MYSELF 0 #define SM_CONTEXTVAR_MYSELF 0
@ -157,16 +157,16 @@ public:
bool Call_AskPluginLoad(char *error, size_t maxlength); bool Call_AskPluginLoad(char *error, size_t maxlength);
/** /**
* Calls the OnPluginInit function. * Calls the OnPluginStart function.
* NOTE: Valid pre-states are: Plugin_Created * NOTE: Valid pre-states are: Plugin_Created
* NOTE: Post-state will be Plugin_Running * NOTE: Post-state will be Plugin_Running
*/ */
void Call_OnPluginInit(); void Call_OnPluginStart();
/** /**
* Calls the OnPluginUnload function. * Calls the OnPluginEnd function.
*/ */
void Call_OnPluginUnload(); void Call_OnPluginEnd();
/** /**
* Toggles debug mode in the plugin * Toggles debug mode in the plugin

View File

@ -55,12 +55,12 @@ public Plugin:myinfo;
forward OnPluginStart(Handle:myself); forward OnPluginStart(Handle:myself);
/** /**
* Called before OnPluginInit, in case the plugin wants to check for load failure. * Called before OnPluginStart, in case the plugin wants to check for load failure.
* This is called even if the plugin type is "private." Any natives from modules are * This is called even if the plugin type is "private." Any natives from modules are
* not available at this point. Thus, this forward should only be used for explicit * not available at this point. Thus, this forward should only be used for explicit
* pre-emptive things, such as adding dynamic natives, or setting certain types of load filters. * pre-emptive things, such as adding dynamic natives, or setting certain types of load filters.
* *
* NOTE: It is not safe to call externally resolved natives until OnPluginInit(). * NOTE: It is not safe to call externally resolved natives until OnPluginStart().
* NOTE: Any sort of RTE in this function will cause the plugin to fail loading. * NOTE: Any sort of RTE in this function will cause the plugin to fail loading.
* *
* @param myself Handle to the plugin. * @param myself Handle to the plugin.