From 3e65d308a81ae83652db36e20453003d86233b6b Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Thu, 1 Jan 2015 14:56:37 -0500 Subject: [PATCH] Don't looks for IServerTools on ep1 games. (We don't use it and it doesn't exist on most.) --- core/sourcemm_api.cpp | 4 ++++ core/sourcemm_api.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/core/sourcemm_api.cpp b/core/sourcemm_api.cpp index 902a241e..8daeb2e0 100644 --- a/core/sourcemm_api.cpp +++ b/core/sourcemm_api.cpp @@ -51,7 +51,9 @@ IPlayerInfoManager *playerinfo = NULL; IBaseFileSystem *basefilesystem = NULL; IFileSystem *filesystem = NULL; IEngineSound *enginesound = NULL; +#if SOURCE_ENGINE >= SE_ORANGEBOX IServerTools *servertools = NULL; +#endif IServerPluginHelpers *serverpluginhelpers = NULL; IServerPluginCallbacks *vsp_interface = NULL; int vsp_version = 0; @@ -70,7 +72,9 @@ bool SourceMod_Core::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen GET_V_IFACE_CURRENT(GetFileSystemFactory, basefilesystem, IBaseFileSystem, BASEFILESYSTEM_INTERFACE_VERSION); GET_V_IFACE_CURRENT(GetFileSystemFactory, filesystem, IFileSystem, FILESYSTEM_INTERFACE_VERSION); GET_V_IFACE_CURRENT(GetEngineFactory, enginesound, IEngineSound, IENGINESOUND_SERVER_INTERFACE_VERSION); +#if SOURCE_ENGINE >= SE_ORANGEBOX GET_V_IFACE_CURRENT(GetServerFactory, servertools, IServerTools, VSERVERTOOLS_INTERFACE_VERSION); +#endif #if SOURCE_ENGINE != SE_DOTA GET_V_IFACE_CURRENT(GetEngineFactory, serverpluginhelpers, IServerPluginHelpers, INTERFACEVERSION_ISERVERPLUGINHELPERS); #endif diff --git a/core/sourcemm_api.h b/core/sourcemm_api.h index 29815005..c813f27e 100644 --- a/core/sourcemm_api.h +++ b/core/sourcemm_api.h @@ -102,7 +102,9 @@ extern IPlayerInfoManager *playerinfo; extern IBaseFileSystem *basefilesystem; extern IFileSystem *filesystem; extern IEngineSound *enginesound; +#if SOURCE_ENGINE >= SE_ORANGEBOX extern IServerTools *servertools; +#endif extern IServerPluginHelpers *serverpluginhelpers; extern IServerPluginCallbacks *vsp_interface; extern int vsp_version;