mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-20 13:54:14 +01:00
Don't compile in VSP bridge on s2.
This commit is contained in:
parent
6a1a79df42
commit
15c84495cb
@ -23,8 +23,7 @@ for sdk_name in MMS.sdks:
|
||||
'sourcehook/sourcehook_impl_chookmaninfo.cpp',
|
||||
'sourcehook/sourcehook_impl_cproto.cpp',
|
||||
'sourcehook/sourcehook_impl_cvfnptr.cpp',
|
||||
'gamedll_bridge.cpp',
|
||||
'vsp_bridge.cpp'
|
||||
'gamedll_bridge.cpp'
|
||||
]
|
||||
|
||||
if sdk_name in ['dota', 'cs2']:
|
||||
@ -32,7 +31,8 @@ for sdk_name in MMS.sdks:
|
||||
else:
|
||||
binary.sources += [
|
||||
'provider/source/provider_source.cpp',
|
||||
'provider/source/provider_source_console.cpp'
|
||||
'provider/source/provider_source_console.cpp',
|
||||
'vsp_bridge.cpp'
|
||||
]
|
||||
|
||||
# Source2 hack. TODO: check this more deterministically, "are we doing an x64 build?"
|
||||
|
@ -34,9 +34,7 @@
|
||||
#include <sh_string.h>
|
||||
#include "provider/provider_base.h"
|
||||
|
||||
#if SOURCE_ENGINE == SE_DOTA
|
||||
SH_DECL_HOOK2_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommandContext &, const CCommand &);
|
||||
#elif SOURCE_ENGINE >= SE_ORANGEBOX
|
||||
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||
SH_DECL_HOOK1_void(ConCommand, Dispatch, SH_NOATTRIB, false, const CCommand &);
|
||||
#else
|
||||
SH_DECL_HOOK0_void(ConCommand, Dispatch, SH_NOATTRIB, false);
|
||||
@ -46,9 +44,7 @@ ConCommand *g_plugin_unload = NULL;
|
||||
bool g_bIsTryingToUnload;
|
||||
SourceHook::String vsp_desc("Metamod:Source");
|
||||
|
||||
#if SOURCE_ENGINE == SE_DOTA
|
||||
void InterceptPluginUnloads(const CCommandContext &context, const CCommand &args)
|
||||
#elif SOURCE_ENGINE >= SE_ORANGEBOX
|
||||
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||
void InterceptPluginUnloads(const CCommand &args)
|
||||
#else
|
||||
void InterceptPluginUnloads()
|
||||
@ -57,9 +53,7 @@ void InterceptPluginUnloads()
|
||||
g_bIsTryingToUnload = true;
|
||||
}
|
||||
|
||||
#if SOURCE_ENGINE == SE_DOTA
|
||||
void InterceptPluginUnloads_Post(const CCommandContext &context, const CCommand &args)
|
||||
#elif SOURCE_ENGINE >= SE_ORANGEBOX
|
||||
#if SOURCE_ENGINE >= SE_ORANGEBOX
|
||||
void InterceptPluginUnloads_Post(const CCommand &args)
|
||||
#else
|
||||
void InterceptPluginUnloads_Post()
|
||||
@ -165,13 +159,12 @@ public:
|
||||
virtual void Unload()
|
||||
{
|
||||
// Source2 doesn't have the Error function (nor VSP support).
|
||||
#if SOURCE_ENGINE != SE_DOTA
|
||||
if (g_bIsTryingToUnload)
|
||||
{
|
||||
Error("Metamod:Source cannot be unloaded from VSP mode. Use \"meta unload\" to unload specific plugins.\n");
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (g_plugin_unload != NULL)
|
||||
{
|
||||
SH_REMOVE_HOOK_STATICFUNC(ConCommand, Dispatch, g_plugin_unload, InterceptPluginUnloads, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user