Permalink
Browse files

Add support for Blade Symphony (bug 5948, r=asherkin).

  • Loading branch information...
psychonic committed Oct 9, 2013
1 parent 3cf2ec8 commit ef3512562e41564edac113d817632073bfa6ea1b
Showing with 23 additions and 8 deletions.
  1. +11 −8 AMBuildScript
  2. +1 −0 core/ISmmPluginExt.h
  3. +2 −0 core/metamod_console.cpp
  4. +2 −0 core/provider/provider_ep2.cpp
  5. +5 −0 loader/loader.cpp
  6. +1 −0 loader/loader.h
  7. +1 −0 loader/serverplugin.cpp
View
@@ -51,15 +51,18 @@ class MMS:
self.possibleSdks['eye'] = {'sdk': 'HL2SDK-EYE', 'ext': '2.eye', 'def': '5',
'name': 'EYE', 'platform': ['windows'],
'dir': 'hl2sdk-eye'}
self.possibleSdks['csgo'] = {'sdk': 'HL2SDKCSGO', 'ext': '2.csgo', 'def': '16',
self.possibleSdks['csgo'] = {'sdk': 'HL2SDKCSGO', 'ext': '2.csgo', 'def': '17',
'name': 'CSGO', 'platform': ['windows', 'linux', 'darwin'],
'dir': 'hl2sdk-csgo'}
self.possibleSdks['dota'] = {'sdk': 'HL2SDKDOTA', 'ext': '2.dota', 'def': '17',
self.possibleSdks['dota'] = {'sdk': 'HL2SDKDOTA', 'ext': '2.dota', 'def': '18',
'name': 'DOTA', 'platform': ['windows'],
'dir': 'hl2sdk-dota'}
self.possibleSdks['portal2'] = {'sdk': 'HL2SDKPORTAL2','ext': '2.portal2', 'def': '15',
'name': 'PORTAL2', 'platform': [],
'dir': 'hl2sdk-portal2'}
self.possibleSdks['blade'] = {'sdk': 'HL2SDKBLADE', 'ext': '2.blade', 'def': '16',
'name': 'BLADE', 'platform': ['windows', 'linux'],
'dir': 'hl2sdk-blade'}
self.sdkInfo = { }
@@ -277,9 +280,9 @@ class MMS:
libs = []
if sdk in ['css', 'hl2dm', 'dods', 'tf2', 'l4d2']:
libs = ['tier1_i486.a', 'libvstdlib_srv.so', 'libtier0_srv.so']
elif sdk in ['l4d', 'nd', 'csgo']:
elif sdk in ['l4d', 'nd', 'blade', 'csgo']:
libs = ['tier1_i486.a', 'libvstdlib.so', 'libtier0.so']
if sdk == 'csgo':
if sdk in ['blade', 'csgo']:
libs.insert(0, 'interfaces_i486.a')
elif sdk == 'sdk2013':
libs = ['tier1.a', 'libvstdlib_srv.so', 'libtier0_srv.so']
@@ -312,7 +315,7 @@ class MMS:
job.AddCommand(SymlinkCommand(link, target))
elif AMBuild.target['platform'] == 'windows':
libs = ['tier0', 'tier1', 'vstdlib']
if sdk in ['swarm', 'csgo', 'dota']:
if sdk in ['swarm', 'blade', 'csgo', 'dota']:
libs.append('interfaces')
for lib in libs:
libPath = os.path.join(sdkPath, 'lib', 'public', lib) + '.lib'
@@ -326,7 +329,7 @@ class MMS:
else:
builder.AddObjectFiles(['tier1_i486.a'])
if( sdk in ['csgo', 'dota'] ):
if( sdk in ['blade', 'csgo', 'dota'] ):
builder.AddObjectFiles(['interfaces_i486.a'])
def DefaultHL2Compiler(self, path, sdk, noLink = False):
@@ -361,7 +364,7 @@ class MMS:
compiler['CDEFINES'].remove('_snprintf=snprintf')
compiler['CDEFINES'].remove('_vsnprintf=vsnprintf')
if sdk in ['swarm', 'csgo', 'dota']:
if sdk in ['swarm', 'blade', 'csgo', 'dota']:
if AMBuild.target['platform'] == 'windows':
compiler['CDEFINES'].extend(['COMPILER_MSVC', 'COMPILER_MSVC32'])
else:
@@ -394,7 +397,7 @@ class MMS:
if sdk in ['css', 'hl2dm', 'dods', 'tf2', 'sdk2013', 'l4d2']:
compiler['POSTLINKFLAGS'][0:0] = ['libtier0_srv.so']
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib_srv.so']
elif sdk in ['l4d', 'nd', 'csgo']:
elif sdk in ['l4d', 'nd', 'blade', 'csgo']:
compiler['POSTLINKFLAGS'][0:0] = ['libtier0.so']
compiler['POSTLINKFLAGS'][0:0] = ['libvstdlib.so']
else:
View
@@ -62,6 +62,7 @@ enum
#define SOURCE_ENGINE_TF2 17 /**< Team Fortress 2 */
#define SOURCE_ENGINE_NUCLEARDAWN 18 /**< Nuclear Dawn */
#define SOURCE_ENGINE_SDK2013 19 /**< Source SDK 2013 */
#define SOURCE_ENGINE_BLADE 20 /**< Blade Symphony */
#define METAMOD_PLAPI_VERSION 15 /**< Version of this header file */
#define METAMOD_PLAPI_NAME "ISmmPlugin" /**< Name of the plugin interface */
View
@@ -139,6 +139,8 @@ bool Command_Meta(IMetamodSourceCommandInfo *info)
CONMSG(" Engine: E.Y.E. Divine Cybermancy (2011)\n");
#elif SOURCE_ENGINE == SE_PORTAL2
CONMSG(" Engine: Portal 2 (2011)\n");
#elif SOURCE_ENGINE == SE_BLADE
CONMSG(" Engine: Blade Symphony (2013)\n");
#elif SOURCE_ENGINE == SE_CSGO
CONMSG(" Engine: Counter-Strike: Global Offensive (2012)\n");
#elif SOURCE_ENGINE == SE_DOTA
@@ -399,6 +399,8 @@ int BaseProvider::DetermineSourceEngine(const char *game)
return SOURCE_ENGINE_EYE;
#elif SOURCE_ENGINE == SE_PORTAL2
return SOURCE_ENGINE_PORTAL2;
#elif SOURCE_ENGINE == SE_BLADE
return SOURCE_ENGINE_BLADE;
#elif SOURCE_ENGINE == SE_CSGO
return SOURCE_ENGINE_CSGO;
#elif SOURCE_ENGINE == SE_DOTA
View
@@ -86,6 +86,7 @@ static const char *backend_names[] =
"2.tf2",
"2.nd",
"2.sdk2013",
"2.blade",
};
#if defined _WIN32
@@ -280,6 +281,10 @@ mm_DetermineBackend(QueryValveInterface engineFactory, const char *game_name)
else if (engineFactory("VEngineServer022", NULL) != NULL &&
engineFactory("VEngineCvar007", NULL) != NULL)
{
if (strcmp(game_name, "berimbau") == 0)
{
return MMBackend_Blade;
}
if (strcmp(game_name, "portal2") == 0)
{
return MMBackend_Portal2;
View
@@ -98,6 +98,7 @@ enum MetamodBackend
MMBackend_TF2,
MMBackend_NuclearDawn,
MMBackend_SDK2013,
MMBackend_Blade,
MMBackend_UNKNOWN
};
View
@@ -136,6 +136,7 @@ class ServerPlugin
/* AS inserted ClientFullyConnect into vtable, so move entries up on older engines */
if (mm_backend != MMBackend_AlienSwarm
&& mm_backend != MMBackend_Portal2
&& mm_backend != MMBackend_Blade
&& mm_backend != MMBackend_CSGO
&& mm_backend != MMBackend_DOTA)
{

0 comments on commit ef35125

Please sign in to comment.