diff --git a/core/logic/common_logic.cpp b/core/logic/common_logic.cpp index b4f41c0f..44f9b71c 100644 --- a/core/logic/common_logic.cpp +++ b/core/logic/common_logic.cpp @@ -59,7 +59,7 @@ SMGlobalClass *SMGlobalClass::head = NULL; CoreProvider *bridge = nullptr; ISourceMod *g_pSM = nullptr; -IVEngineServer *engine = nullptr; +IVEngineServerBridge *engine = nullptr; IdentityToken_t *g_pCoreIdent = nullptr; ITimerSystem *timersys = nullptr; IGameHelpers *gamehelpers = nullptr; diff --git a/core/logic/common_logic.h b/core/logic/common_logic.h index cbb29090..05286b3e 100644 --- a/core/logic/common_logic.h +++ b/core/logic/common_logic.h @@ -42,7 +42,6 @@ extern IHandleSys *handlesys; extern ISourceMod *g_pSM; extern ILibrarySys *libsys; extern ITextParsers *textparser; -extern IVEngineServer *engine; extern IShareSys *sharesys; extern IRootConsole *rootmenu; extern IPluginManager *pluginsys; @@ -57,5 +56,11 @@ extern IExtensionSys *extsys; extern ILogger *logger; extern IMenuManager *menus; +#if defined SM_LOGIC +extern IVEngineServerBridge *engine; +#else +extern IVEngineServer *engine; +#endif + #endif /* _INCLUDE_SOURCEMOD_COMMON_LOGIC_H_ */ diff --git a/core/logic/intercom.h b/core/logic/intercom.h index 7bb0a1a5..b67323e1 100644 --- a/core/logic/intercom.h +++ b/core/logic/intercom.h @@ -54,15 +54,7 @@ using namespace SourceHook; */ #define SM_LOGIC_MAGIC (0x0F47C0DE - 48) -#if defined SM_LOGIC -# define IVEngineClass IVEngineServer -# define IFileSystemClass IFileSystem -#else -# define IVEngineClass IVEngineServer_Logic -# define IFileSystemClass IFileSystem_Logic -#endif - -class IVEngineClass +class IVEngineServerBridge { public: virtual bool IsDedicatedServer() = 0; @@ -77,7 +69,7 @@ public: typedef void * FileHandle_t; typedef int FileFindHandle_t; -class IFileSystemClass +class IFileSystemBridge { public: virtual const char *FindFirstEx(const char *pWildCard, const char *pPathID, FileFindHandle_t *pHandle) = 0; @@ -128,7 +120,7 @@ class KeyValues; class SMGlobalClass; class IPlayerInfo; -class IPlayerInfo_Logic +class IPlayerInfoBridge { public: virtual bool IsObserver(IPlayerInfo *pInfo) = 0; @@ -278,9 +270,9 @@ class CoreProvider public: /* Objects */ ISourceMod *sm; - IVEngineClass *engine; - IFileSystemClass *filesystem; - IPlayerInfo_Logic *playerInfo; + IVEngineServerBridge *engine; + IFileSystemBridge *filesystem; + IPlayerInfoBridge *playerInfo; ITimerSystem *timersys; IPlayerManager *playerhelpers; IGameHelpers *gamehelpers; diff --git a/core/logic_bridge.cpp b/core/logic_bridge.cpp index 17279c5a..f5a46c7f 100644 --- a/core/logic_bridge.cpp +++ b/core/logic_bridge.cpp @@ -89,7 +89,7 @@ IAdminSystem *adminsys = nullptr; ILogger *logger = nullptr; IRootConsole *rootmenu = nullptr; -class VEngineServer_Logic : public IVEngineServer_Logic +class VEngineServer_Logic : public IVEngineServerBridge { public: virtual bool IsDedicatedServer() @@ -130,7 +130,7 @@ public: } } engine_wrapper; -class VFileSystem_Logic : public IFileSystem_Logic +class VFileSystem_Logic : public IFileSystemBridge { public: const char *FindFirstEx(const char *pWildCard, const char *pPathID, FileFindHandle_t *pHandle) @@ -219,7 +219,7 @@ public: } } fs_wrapper; -class VPlayerInfo_Logic : public IPlayerInfo_Logic +class VPlayerInfo_Logic : public IPlayerInfoBridge { public: bool IsObserver(IPlayerInfo *pInfo)