sourcemm/stub_mm/stub_mm.cpp
changeset 53 797ecc5394d6
parent 31 543ffb5f4908
child 140 800dc9ba92c5
     1.1 --- a/sourcemm/stub_mm/stub_mm.cpp	Sun May 01 18:42:16 2005 +0000
     1.2 +++ b/sourcemm/stub_mm/stub_mm.cpp	Sun May 01 18:46:06 2005 +0000
     1.3 @@ -18,7 +18,7 @@
     1.4  //This has all of the necessary hook declarations.  Read it!
     1.5  #include "meta_hooks.h"
     1.6  
     1.7 -void StubPlugin::ServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
     1.8 +void ServerActivate_handler(edict_t *pEdictList, int edictCount, int clientMax)
     1.9  {
    1.10  	META_LOG(g_PLAPI, "ServerActivate() called: edictCount=%d, clientMax=%d", edictCount, clientMax);
    1.11  	RETURN_META(MRES_IGNORED);
    1.12 @@ -36,18 +36,14 @@
    1.13  		return false;
    1.14  	}
    1.15  
    1.16 -	SH_ADD_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, m_ServerDll, &g_StubPlugin, ServerActivate, true);
    1.17 -
    1.18 -	m_ServerDll_CC = SH_GET_CALLCLASS(IServerGameDLL, m_ServerDll);
    1.19 +	SH_ADD_HOOK_STATICFUNC(IServerGameDLL, ServerActivate, m_ServerDll, ServerActivate_handler, true);
    1.20  
    1.21  	return true;
    1.22  }
    1.23  
    1.24  bool StubPlugin::Unload(char *error, size_t maxlen)
    1.25  {
    1.26 -	SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, m_ServerDll, &g_StubPlugin, ServerActivate, true);
    1.27 -
    1.28 -	SH_RELEASE_CALLCLASS(m_ServerDll_CC);
    1.29 +	SH_REMOVE_HOOK_STATICFUNC(IServerGameDLL, ServerActivate, m_ServerDll, ServerActivate_handler, true);
    1.30  
    1.31  	return true;
    1.32  }