1.1 --- a/extensions/sdktools/extension.cpp Fri Oct 19 09:03:34 2007 +0000
1.2 +++ b/extensions/sdktools/extension.cpp Sat Oct 20 23:39:10 2007 +0000
1.3 @@ -48,6 +48,7 @@
1.4 */
1.5
1.6 SH_DECL_HOOK6(IServerGameDLL, LevelInit, SH_NOATTRIB, false, bool, const char *, const char *, const char *, const char *, bool, bool);
1.7 +SH_DECL_HOOK3_void(IServerGameDLL, ServerActivate, SH_NOATTRIB, 0, edict_t *, int, int);
1.8
1.9 SDKTools g_SdkTools; /**< Global singleton for extension's main interface */
1.10 IServerGameEnts *gameents = NULL;
1.11 @@ -73,6 +74,7 @@
1.12 extern sp_nativeinfo_t g_StringTableNatives[];
1.13 extern sp_nativeinfo_t g_VoiceNatives[];
1.14 extern sp_nativeinfo_t g_EntInputNatives[];
1.15 +extern sp_nativeinfo_t g_TeamNatives[];
1.16
1.17 bool SDKTools::SDK_OnLoad(char *error, size_t maxlength, bool late)
1.18 {
1.19 @@ -85,6 +87,7 @@
1.20 sharesys->AddNatives(myself, g_StringTableNatives);
1.21 sharesys->AddNatives(myself, g_VoiceNatives);
1.22 sharesys->AddNatives(myself, g_EntInputNatives);
1.23 + sharesys->AddNatives(myself, g_TeamNatives);
1.24
1.25 SM_GET_IFACE(GAMEHELPERS, g_pGameHelpers);
1.26
1.27 @@ -103,6 +106,7 @@
1.28 CONVAR_REGISTER(this);
1.29
1.30 SH_ADD_HOOK_MEMFUNC(IServerGameDLL, LevelInit, gamedll, this, &SDKTools::LevelInit, true);
1.31 + SH_ADD_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, gamedll, this, &SDKTools::OnServerActivate, false);
1.32
1.33 MathLib_Init(2.2f, 2.2f, 0.0f, 2);
1.34
1.35 @@ -146,6 +150,7 @@
1.36 playerhelpers->RemoveClientListener(&g_SdkTools);
1.37
1.38 SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, LevelInit, gamedll, this, &SDKTools::LevelInit, true);
1.39 + SH_REMOVE_HOOK_MEMFUNC(IServerGameDLL, ServerActivate, gamedll, this, &SDKTools::OnServerActivate, false);
1.40 }
1.41
1.42 bool SDKTools::SDK_OnMetamodLoad(ISmmAPI *ismm, char *error, size_t maxlen, bool late)