untested fix for issue where hooks were not released on server deactivate - only on plugin load

This commit is contained in:
David Anderson 2006-04-29 07:23:23 +00:00
parent d78ec24679
commit d2b57d29fb
2 changed files with 4 additions and 3 deletions

View File

@ -26,6 +26,7 @@ void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
{
for(int i = 1; i <= gpGlobals->maxClients;i++)
g_player_edicts[i]=pEdictList + i;
g_pFunctionTable->pfnServerDeactivate = FMH_ServerDeactivate;
RETURN_META(MRES_IGNORED);
}
#define RESETD(tcall) \
@ -46,7 +47,7 @@ void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
Engine[FM_##call].clear(); \
EnginePost[FM_##call].clear();
void OnPluginsLoaded()
void FMH_ServerDeactivate()
{
// Reset all call lists here.
// NULL all function tables

View File

@ -45,7 +45,7 @@
//#define FN_AMXX_DETACH OnAmxxDetach
// All plugins loaded
// Do forward functions init here (MF_RegisterForward)
#define FN_AMXX_PLUGINSLOADED OnPluginsLoaded
// #define FN_AMXX_PLUGINSLOADED OnPluginsLoaded
/**** METAMOD ****/
// If your module doesn't use metamod, you may close the file now :)
@ -88,7 +88,7 @@
// #define FN_ClientCommand ClientCommand /* pfnClientCommand() (wd) Player has sent a command (typed or from a bind) */
// #define FN_ClientUserInfoChanged ClientUserInfoChanged /* pfnClientUserInfoChanged() (wd) Client has updated their setinfo structure */
#define FN_ServerActivate ServerActivate /* pfnServerActivate() (wd) Server is starting a new map */
// #define FN_ServerDeactivate ServerDeactivate /* pfnServerDeactivate() (wd) Server is leaving the map (shutdown or changelevel); SDK2 */
#define FN_ServerDeactivate FMH_ServerDeactivate /* pfnServerDeactivate() (wd) Server is leaving the map (shutdown or changelevel); SDK2 */
// #define FN_PlayerPreThink PlayerPreThink /* pfnPlayerPreThink() */
// #define FN_PlayerPostThink PlayerPostThink /* pfnPlayerPostThink() */
// #define FN_StartFrame StartFrame /* pfnStartFrame() */