Permalink
Browse files

Split Day of Infamy to separate engine build (#36)

  • Loading branch information...
psychonic committed Nov 3, 2017
1 parent 4a27e2f commit c93b3e2d9531f925ab39ad5a73172e7e67dfa9b1
Showing with 23 additions and 6 deletions.
  1. +7 −6 AMBuildScript
  2. +1 −0 core/ISmmPluginExt.h
  3. +2 −0 core/metamod_console.cpp
  4. +2 −0 core/provider/provider_ep2.cpp
  5. +9 −0 loader/loader.cpp
  6. +1 −0 loader/loader.h
  7. +1 −0 loader/serverplugin.cpp
View
@@ -31,11 +31,12 @@ PossibleSDKs = {
'swarm': SDK('HL2SDK-SWARM', '2.swarm', '16', 'ALIENSWARM', WinOnly, 'swarm'),
'bgt': SDK('HL2SDK-BGT', '2.bgt', '4', 'BLOODYGOODTIME', WinOnly, 'bgt'),
'eye': SDK('HL2SDK-EYE', '2.eye', '5', 'EYE', WinOnly, 'eye'),
'csgo': SDK('HL2SDKCSGO', '2.csgo', '20', 'CSGO', WinLinuxMac, 'csgo'),
'dota': SDK('HL2SDKDOTA', '2.dota', '21', 'DOTA', [], 'dota'),
'csgo': SDK('HL2SDKCSGO', '2.csgo', '21', 'CSGO', WinLinuxMac, 'csgo'),
'dota': SDK('HL2SDKDOTA', '2.dota', '22', 'DOTA', [], 'dota'),
'portal2': SDK('HL2SDKPORTAL2', '2.portal2', '17', 'PORTAL2', [], 'portal2'),
'blade': SDK('HL2SDKBLADE', '2.blade', '18', 'BLADE', WinLinux, 'blade'),
'insurgency': SDK('HL2SDKINSURGENCY', '2.insurgency', '19', 'INSURGENCY', WinLinuxMac, 'insurgency'),
'doi': SDK('HL2SDKDOI', '2.doi', '20', 'DOI', WinLinuxMac, 'doi'),
'contagion': SDK('HL2SDKCONTAGION', '2.contagion', '14', 'CONTAGION', WinOnly, 'contagion'),
'bms': SDK('HL2SDKBMS', '2.bms', '10', 'BMS', WinLinux, 'bms'),
}
@@ -323,17 +324,17 @@ class MMSConfig(object):
else:
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'tier1_i486.a'))]
if sdk.name in ['blade', 'insurgency', 'csgo', 'dota']:
if sdk.name in ['blade', 'insurgency', 'doi', 'csgo', 'dota']:
compiler.postlink += [compiler.Dep(os.path.join(lib_folder, 'interfaces_i486.a'))]
binary = self.LibraryBuilder(compiler, name)
dynamic_libs = []
if builder.target_platform == 'linux':
compiler.linkflags[0:0] = ['-lm']
if sdk.name in ['css', 'hl2dm', 'dods', 'tf2', 'sdk2013', 'bms', 'nucleardawn', 'l4d2', 'insurgency']:
if sdk.name in ['css', 'hl2dm', 'dods', 'tf2', 'sdk2013', 'bms', 'nucleardawn', 'l4d2', 'insurgency', 'doi']:
dynamic_libs = ['libtier0_srv.so', 'libvstdlib_srv.so']
elif sdk.name in ['l4d', 'blade', 'insurgency', 'csgo', 'dota']:
elif sdk.name in ['l4d', 'blade', 'insurgency', 'doi', 'csgo', 'dota']:
dynamic_libs = ['libtier0.so', 'libvstdlib.so']
else:
dynamic_libs = ['tier0_i486.so', 'vstdlib_i486.so']
@@ -342,7 +343,7 @@ class MMSConfig(object):
dynamic_libs = ['libtier0.dylib', 'libvstdlib.dylib']
elif builder.target_platform == 'windows':
libs = ['tier0', 'tier1', 'vstdlib']
if sdk.name in ['swarm', 'blade', 'insurgency', 'csgo', 'dota']:
if sdk.name in ['swarm', 'blade', 'insurgency', 'doi', 'csgo', 'dota']:
libs.append('interfaces')
for lib in libs:
lib_path = os.path.join(sdk.path, 'lib', 'public', lib) + '.lib'
View
@@ -59,6 +59,7 @@
#define SOURCE_ENGINE_INSURGENCY 21 /**< Insurgency */
#define SOURCE_ENGINE_CONTAGION 22 /**< Contagion */
#define SOURCE_ENGINE_BMS 23 /**< Black Mesa Multiplayer */
#define SOURCE_ENGINE_DOI 24 /**< Day of Infamy */
#define METAMOD_PLAPI_VERSION 15 /**< Version of this header file */
#define METAMOD_PLAPI_NAME "ISmmPlugin" /**< Name of the plugin interface */
View
@@ -151,6 +151,8 @@ bool Command_Meta(IMetamodSourceCommandInfo *info)
CONMSG(" Engine: Blade Symphony (2013)\n");
#elif SOURCE_ENGINE == SE_INSURGENCY
CONMSG(" Engine: Insurgency (2013)\n");
#elif SOURCE_ENGINE == SE_DOI
CONMSG(" Engine: Day of Infamy (2016)\n");
#elif SOURCE_ENGINE == SE_CSGO
CONMSG(" Engine: Counter-Strike: Global Offensive (2012)\n");
#elif SOURCE_ENGINE == SE_DOTA
@@ -423,6 +423,8 @@ int BaseProvider::DetermineSourceEngine()
return SOURCE_ENGINE_BLADE;
#elif SOURCE_ENGINE == SE_INSURGENCY
return SOURCE_ENGINE_INSURGENCY;
#elif SOURCE_ENGINE == SE_DOI
return SOURCE_ENGINE_DOI;
#elif SOURCE_ENGINE == SE_CSGO
return SOURCE_ENGINE_CSGO;
#elif SOURCE_ENGINE == SE_DOTA
View
@@ -90,6 +90,7 @@ static const char *backend_names[] =
"2.insurgency",
"2.contagion",
"2.bms",
"2.doi",
};
#if defined _WIN32
@@ -287,6 +288,14 @@ mm_DetermineBackend(QueryValveInterface engineFactory, QueryValveInterface serve
if (engineFactory("IEngineSoundServer004", NULL) != NULL)
{
void *lib = (void *)serverFactory;
void *addr;
if (strcmp(game_name, "doi") == 0
|| (addr = mm_FindPattern(lib, "doi_gamerules_data", sizeof("doi_gamerules_data") - 1)))
{
return MMBackend_DOI;
}
return MMBackend_Insurgency;
}
View
@@ -102,6 +102,7 @@ enum MetamodBackend
MMBackend_Insurgency,
MMBackend_Contagion,
MMBackend_BMS,
MMBackend_DOI,
MMBackend_UNKNOWN
};
View
@@ -135,6 +135,7 @@ class ServerPlugin
&& mm_backend != MMBackend_Portal2
&& mm_backend != MMBackend_Blade
&& mm_backend != MMBackend_Insurgency
&& mm_backend != MMBackend_DOI
&& mm_backend != MMBackend_CSGO
&& mm_backend != MMBackend_DOTA)
{

0 comments on commit c93b3e2

Please sign in to comment.