fixed a serious potential bug with swapping plugins to debug mode, leaving stale function pointers without plugin removal
2 * ===============================================================
3 * SourceMod (C)2004-2007 AlliedModders LLC. All rights reserved.
4 * ===============================================================
6 * This file is not open source and may not be copied without explicit
7 * written permission of AlliedModders LLC. This file may not be redistributed
8 * in whole or significant part.
9 * For information, see LICENSE.txt or http://www.sourcemod.net/license.php
14 #ifndef _INCLUDE_SOURCEMOD_MM_API_H_
15 #define _INCLUDE_SOURCEMOD_MM_API_H_
17 #include "convar_sm.h"
18 #include <ISmmPlugin.h>
21 #include <igameevents.h>
24 * @file Contains wrappers around required Metamod:Source API exports
27 class SourceMod_Core : public ISmmPlugin
30 bool Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late);
31 bool Unload(char *error, size_t maxlen);
32 bool Pause(char *error, size_t maxlen);
33 bool Unpause(char *error, size_t maxlen);
34 void AllPluginsLoaded();
36 const char *GetAuthor();
37 const char *GetName();
38 const char *GetDescription();
40 const char *GetLicense();
41 const char *GetVersion();
42 const char *GetDate();
43 const char *GetLogTag();
46 extern SourceMod_Core g_SourceMod_Core;
47 extern IVEngineServer *engine;
48 extern IServerGameDLL *gamedll;
49 extern IServerGameClients *serverClients;
51 extern ISmmPluginManager *g_pMMPlugins;
52 extern CGlobalVars *gpGlobals;
53 extern IGameEventManager2 *gameevents;
54 extern SourceHook::CallClass<IVEngineServer> *enginePatch;
56 #define ENGINE_CALL(func) SH_CALL(enginePatch, &IVEngineServer::func)
60 #endif //_INCLUDE_SOURCEMOD_MM_API_H_