diff --git a/core/PlayerManager.cpp b/core/PlayerManager.cpp index 8f4e9ca9..56fff760 100644 --- a/core/PlayerManager.cpp +++ b/core/PlayerManager.cpp @@ -66,6 +66,7 @@ void PlayerManager::OnSourceModAllInitialized() 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_onActivate = g_Forwards.CreateForward("OnServerLoad", ET_Ignore, 0, NULL); + m_onActivate2 = g_Forwards.CreateForward("OnMapStart", ET_Ignore, 0, NULL); } void PlayerManager::OnSourceModShutdown() @@ -87,6 +88,7 @@ void PlayerManager::OnSourceModShutdown() g_Forwards.ReleaseForward(m_clinfochanged); g_Forwards.ReleaseForward(m_clauth); g_Forwards.ReleaseForward(m_onActivate); + g_Forwards.ReleaseForward(m_onActivate2); 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)); } m_onActivate->Execute(NULL); + m_onActivate2->Execute(NULL); } void PlayerManager::RunAuthChecks() diff --git a/core/PlayerManager.h b/core/PlayerManager.h index 56811de2..30986ac9 100644 --- a/core/PlayerManager.h +++ b/core/PlayerManager.h @@ -117,6 +117,7 @@ private: IForward *m_clinfochanged; IForward *m_clauth; IForward *m_onActivate; + IForward *m_onActivate2; CPlayer *m_Players; int *m_UserIdLookUp; int m_maxClients; diff --git a/plugins/include/sourcemod.inc b/plugins/include/sourcemod.inc index 425bb70a..9e548a34 100644 --- a/plugins/include/sourcemod.inc +++ b/plugins/include/sourcemod.inc @@ -114,12 +114,12 @@ forward OnPluginPauseChange(bool:pause); forward OnGameFrame(); /** - * Called when the map is loaded and configs have been parsed. - * Note that commands are processed per-frame, and thus config - * files may not be fully loaded until a few seconds later. - * This function will be called on each mapchange. + * Called when the map is loaded. + * + * Note: This used to be OnServerLoad(), which is now deprecated. + * Plugins still using the old forward will work. */ -forward OnServerLoad(); +forward OnMapStart(); /** * Returns the calling plugin's Handle.