renamed OnServerLoad to OnMapStart

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40723
This commit is contained in:
David Anderson 2007-05-02 17:45:09 +00:00
parent d432dc0cbd
commit d57f543820
3 changed files with 9 additions and 5 deletions

View File

@ -66,6 +66,7 @@ void PlayerManager::OnSourceModAllInitialized()
m_clinfochanged = g_Forwards.CreateForward("OnClientSettingsChanged", ET_Ignore, 1, p2); m_clinfochanged = g_Forwards.CreateForward("OnClientSettingsChanged", ET_Ignore, 1, p2);
m_clauth = g_Forwards.CreateForward("OnClientAuthorized", ET_Ignore, 2, NULL, Param_Cell, Param_String); m_clauth = g_Forwards.CreateForward("OnClientAuthorized", ET_Ignore, 2, NULL, Param_Cell, Param_String);
m_onActivate = g_Forwards.CreateForward("OnServerLoad", ET_Ignore, 0, NULL); m_onActivate = g_Forwards.CreateForward("OnServerLoad", ET_Ignore, 0, NULL);
m_onActivate2 = g_Forwards.CreateForward("OnMapStart", ET_Ignore, 0, NULL);
} }
void PlayerManager::OnSourceModShutdown() void PlayerManager::OnSourceModShutdown()
@ -87,6 +88,7 @@ void PlayerManager::OnSourceModShutdown()
g_Forwards.ReleaseForward(m_clinfochanged); g_Forwards.ReleaseForward(m_clinfochanged);
g_Forwards.ReleaseForward(m_clauth); g_Forwards.ReleaseForward(m_clauth);
g_Forwards.ReleaseForward(m_onActivate); g_Forwards.ReleaseForward(m_onActivate);
g_Forwards.ReleaseForward(m_onActivate2);
delete [] m_Players; delete [] m_Players;
} }
@ -105,6 +107,7 @@ void PlayerManager::OnServerActivate(edict_t *pEdictList, int edictCount, int cl
memset(m_AuthQueue, 0, sizeof(unsigned int) * (m_maxClients + 1)); memset(m_AuthQueue, 0, sizeof(unsigned int) * (m_maxClients + 1));
} }
m_onActivate->Execute(NULL); m_onActivate->Execute(NULL);
m_onActivate2->Execute(NULL);
} }
void PlayerManager::RunAuthChecks() void PlayerManager::RunAuthChecks()

View File

@ -117,6 +117,7 @@ private:
IForward *m_clinfochanged; IForward *m_clinfochanged;
IForward *m_clauth; IForward *m_clauth;
IForward *m_onActivate; IForward *m_onActivate;
IForward *m_onActivate2;
CPlayer *m_Players; CPlayer *m_Players;
int *m_UserIdLookUp; int *m_UserIdLookUp;
int m_maxClients; int m_maxClients;

View File

@ -114,12 +114,12 @@ forward OnPluginPauseChange(bool:pause);
forward OnGameFrame(); forward OnGameFrame();
/** /**
* Called when the map is loaded and configs have been parsed. * Called when the map is loaded.
* Note that commands are processed per-frame, and thus config *
* files may not be fully loaded until a few seconds later. * Note: This used to be OnServerLoad(), which is now deprecated.
* This function will be called on each mapchange. * Plugins still using the old forward will work.
*/ */
forward OnServerLoad(); forward OnMapStart();
/** /**
* Returns the calling plugin's Handle. * Returns the calling plugin's Handle.