Remove the ability to compile against Metamod:Source versions lower than 1.8.

This commit is contained in:
David Anderson
2015-09-09 18:54:43 -07:00
parent c54b54ded0
commit df672dd8ce
7 changed files with 8 additions and 93 deletions
+4 -27
View File
@@ -63,6 +63,10 @@ int vsp_version = 0;
PLUGIN_EXPOSE(SourceMod, g_SourceMod_Core);
#if !defined(METAMOD_PLAPI_VERSION) && PLAPI_VERSION < 11
# error "SourceMod requires Metamod:Source 1.8 or higher."
#endif
ConVar sourcemod_version("sourcemod_version", SOURCEMOD_VERSION, FCVAR_SPONLY|FCVAR_REPLICATED|FCVAR_NOTIFY, "SourceMod Version");
bool SourceMod_Core::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen, bool late)
@@ -100,9 +104,7 @@ bool SourceMod_Core::Load(PluginId id, ISmmAPI *ismm, char *error, size_t maxlen
ismm->AddListener(this, this);
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
if ((vsp_interface = g_SMAPI->GetVSPInfo(&vsp_version)) == NULL)
#endif
{
g_SMAPI->EnableVSPListener();
}
@@ -190,31 +192,15 @@ void SourceMod_Core::OnVSPListening(IServerPluginCallbacks *iface)
return;
}
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
if (vsp_version == 0)
{
g_SMAPI->GetVSPInfo(&vsp_version);
}
#else
if (vsp_version == 0)
{
if (strcmp(g_SourceMod.GetGameFolderName(), "ship") == 0)
{
vsp_version = 1;
}
else
{
vsp_version = 2;
}
}
#endif
/* Notify! */
sCoreProviderImpl.OnVSPReceived();
}
#if defined METAMOD_PLAPI_VERSION || PLAPI_VERSION >= 11
void SourceMod_Core::OnUnlinkConCommandBase(PluginId id, ConCommandBase *pCommand)
{
#if SOURCE_ENGINE < SE_ORANGEBOX
@@ -222,15 +208,6 @@ void SourceMod_Core::OnUnlinkConCommandBase(PluginId id, ConCommandBase *pComman
#endif
}
#else
void SourceMod_Core::OnPluginUnload(PluginId id)
{
Global_OnUnlinkConCommandBase(NULL);
}
#endif
void *SourceMod_Core::OnMetamodQuery(const char *iface, int *ret)
{
void *ptr = NULL;