diff --git a/AMBuildScript b/AMBuildScript index d412941c..d0997710 100644 --- a/AMBuildScript +++ b/AMBuildScript @@ -36,6 +36,11 @@ CSGO = { 'linux': ['x86', 'x86_64'], 'mac': ['x86_64'] } +Mock = { + 'windows': ['x86', 'x86_64'], + 'linux': ['x86', 'x86_64'], + 'mac': ['x86_64'] +} SDKMap = { 'episode1': SDK('HL2SDK', '2.ep1', '1', 'EPISODEONE', WinLinux, 'episode1'), @@ -59,6 +64,7 @@ SDKMap = { 'contagion': SDK('HL2SDKCONTAGION', '2.contagion', '14', 'CONTAGION', WinOnly, 'contagion'), 'bms': SDK('HL2SDKBMS', '2.bms', '10', 'BMS', WinLinux, 'bms'), 'doi': SDK('HL2SDKDOI', '2.doi', '20', 'DOI', WinLinuxMac, 'doi'), + 'mock': SDK('HL2SDK-MOCK', '2.mock', '999', 'MOCK', Mock, 'mock'), } # Stable sorting for command equivalence in AMBuild. @@ -613,7 +619,7 @@ class SMConfig(object): if compiler.target.platform == 'linux': if sdk.name in ['css', 'hl2dm', 'dods', 'tf2', 'sdk2013', 'bms', 'nucleardawn', 'l4d2', 'insurgency', 'doi']: dynamic_libs = ['libtier0_srv.so', 'libvstdlib_srv.so'] - elif compiler.target.arch == 'x86_64' and sdk.name in ['csgo', 'blade']: + elif compiler.target.arch == 'x86_64' and sdk.name in ['csgo', 'blade', 'mock']: dynamic_libs = ['libtier0_client.so', 'libvstdlib_client.so'] elif sdk.name in ['l4d', 'blade', 'insurgency', 'doi', 'csgo']: dynamic_libs = ['libtier0.so', 'libvstdlib.so'] diff --git a/core/logic_bridge.cpp b/core/logic_bridge.cpp index 84ab5f3f..18e68511 100644 --- a/core/logic_bridge.cpp +++ b/core/logic_bridge.cpp @@ -496,6 +496,8 @@ const char *CoreProviderImpl::GetSourceEngineName() return "doi"; #elif SOURCE_ENGINE == SE_CSGO return "csgo"; +#elif SOURCE_ENGINE == SE_MOCK + return "mock"; #endif } diff --git a/extensions/sdkhooks/AMBuilder b/extensions/sdkhooks/AMBuilder index 1a18a995..7168a0be 100644 --- a/extensions/sdkhooks/AMBuilder +++ b/extensions/sdkhooks/AMBuilder @@ -12,6 +12,8 @@ project.sources += [ for sdk_name in SM.sdks: sdk = SM.sdks[sdk_name] + if sdk.name == 'mock': + continue for cxx in builder.targets: if not cxx.target.arch in sdk.platformSpec[cxx.target.platform]: diff --git a/loader/loader.cpp b/loader/loader.cpp index 9e242171..563eb7bb 100644 --- a/loader/loader.cpp +++ b/loader/loader.cpp @@ -85,6 +85,7 @@ #define FILENAME_1_6_DOI PLATFORM_ARCH_FOLDER "sourcemod.2.doi" PLATFORM_EXT #define FILENAME_1_6_CONTAGION PLATFORM_ARCH_FOLDER "sourcemod.2.contagion" PLATFORM_EXT #define FILENAME_1_6_BMS PLATFORM_ARCH_FOLDER "sourcemod.2.bms" PLATFORM_EXT +#define FILENAME_1_6_MOCK PLATFORM_ARCH_FOLDER "sourcemod.2.mock" PLATFORM_EXT HINSTANCE g_hCore = NULL; bool load_attempted = false; @@ -333,6 +334,11 @@ DLL_EXPORT METAMOD_PLUGIN *CreateInterface_MMS(const MetamodVersionInfo *mvi, co filename = FILENAME_1_6_DOI; break; } + case SOURCE_ENGINE_MOCK: + { + filename = FILENAME_1_6_MOCK; + break; + } default: { return NULL;