1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-01-19 08:52:34 +01:00

Add support for Military Conflict: Vietnam (#100)

This commit is contained in:
Nicholas Hastings 2022-12-19 20:27:03 -05:00 committed by GitHub
parent 6f93de3554
commit 63c5c15a9f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 42 additions and 28 deletions

View File

@ -67,8 +67,9 @@ PossibleSDKs = {
'swarm': SDK('HL2SDK-SWARM', '2.swarm', '17', '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', '22', 'CSGO', CSGO, 'csgo'),
'dota': SDK('HL2SDKDOTA', '2.dota', '23', 'DOTA', [], 'dota'),
'mcv': SDK('HL2SDKMCV', '2.mcv', '22', 'MCV', WinOnly, 'mcv'),
'csgo': SDK('HL2SDKCSGO', '2.csgo', '23', 'CSGO', CSGO, 'csgo'),
'dota': SDK('HL2SDKDOTA', '2.dota', '24', 'DOTA', [], 'dota'),
'portal2': SDK('HL2SDKPORTAL2', '2.portal2', '18', 'PORTAL2', [], 'portal2'),
'blade': SDK('HL2SDKBLADE', '2.blade', '19', 'BLADE', Blade, 'blade'),
'insurgency': SDK('HL2SDKINSURGENCY', '2.insurgency', '20', 'INSURGENCY', Insurgency, 'insurgency'),
@ -500,7 +501,7 @@ class MMSConfig(object):
dynamic_libs = ['libtier0.dylib', 'libvstdlib.dylib']
elif compiler.target.platform == 'windows':
libs = ['tier0', 'tier1', 'vstdlib']
if sdk.name in ['swarm', 'blade', 'insurgency', 'doi', 'csgo', 'dota']:
if sdk.name in ['swarm', 'blade', 'insurgency', 'doi', 'mcv', 'csgo', 'dota']:
libs.append('interfaces')
if sdk.name == 'bms':
libs.append('mathlib')

View File

@ -62,6 +62,7 @@
#define SOURCE_ENGINE_DOI 24 /**< Day of Infamy */
#define SOURCE_ENGINE_MOCK 25 /**< Mock source engine */
#define SOURCE_ENGINE_PVKII 26 /**< Pirates, Vikings, and Knights II */
#define SOURCE_ENGINE_MCV 27 /**< Military Conflict: Vietnam */
#define METAMOD_PLAPI_VERSION 16 /**< Version of this header file */
#define METAMOD_PLAPI_NAME "ISmmPlugin" /**< Name of the plugin interface */

View File

@ -441,7 +441,7 @@ void BaseProvider::UnregisterConCommandBase(ConCommandBase *pCommand)
int BaseProvider::GetUserMessageCount()
{
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_DOTA || SOURCE_ENGINE == SE_BLADE
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_DOTA || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
return -1;
#else
return (int)usermsgs_list.size();
@ -544,6 +544,8 @@ int BaseProvider::DetermineSourceEngine()
return SOURCE_ENGINE_MOCK;
#elif SOURCE_ENGINE == SE_PVKII
return SOURCE_ENGINE_PVKII;
#elif SOURCE_ENGINE == SE_MCV
return SOURCE_ENGINE_MCV;
#else
#error "SOURCE_ENGINE not defined to a known value"
#endif
@ -679,6 +681,8 @@ const char *BaseProvider::GetEngineDescription() const
return "Mock";
#elif SOURCE_ENGINE == SE_PVKII
return "Pirates, Vikings, and Knights II";
#elif SOURCE_ENGINE == SE_MCV
return "Military Combat: Vietnam";
#else
#error "SOURCE_ENGINE not defined to a known value"
#endif
@ -765,7 +769,7 @@ void ClientCommand(edict_t *client)
RETURN_META(MRES_IGNORED);
}
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_DOTA || SOURCE_ENGINE == SE_BLADE
#if SOURCE_ENGINE == SE_CSGO || SOURCE_ENGINE == SE_DOTA || SOURCE_ENGINE == SE_BLADE || SOURCE_ENGINE == SE_MCV
void CacheUserMessages()
{

View File

@ -92,7 +92,8 @@ static const char *backend_names[] =
"2.bms",
"2.doi",
"2.mock",
"2.pvkii"
"2.pvkii",
"2.mcv"
};
#if defined _WIN32
@ -330,6 +331,11 @@ mm_DetermineBackend(QueryValveInterface engineFactory, QueryValveInterface serve
{
return MMBackend_Blade;
}
if (mm_FindPattern((void *)engineFactory, "Military Conflict: Vietnam", sizeof("Military Conflict: Vietnam") - 1))
{
return MMBackend_MCV;
}
return MMBackend_CSGO;
}

View File

@ -104,8 +104,8 @@ enum MetamodBackend
MMBackend_BMS,
MMBackend_DOI,
MMBackend_Mock,
MMBackend_PVKII,
MMBackend_MCV,
MMBackend_UNKNOWN
};

View File

@ -139,6 +139,7 @@ public:
&& mm_backend != MMBackend_Insurgency
&& mm_backend != MMBackend_DOI
&& mm_backend != MMBackend_CSGO
&& mm_backend != MMBackend_MCV
&& mm_backend != MMBackend_DOTA)
{
SourceHook::MemFuncInfo mfp_fconnect;

View File

@ -8,28 +8,29 @@
[CmdletBinding()]
param(
[string[]]$SDKs = @(
'csgo',
'hl2dm',
'nucleardawn',
'l4d2',
'dods',
'l4d',
'css',
'tf2',
'insurgency',
'sdk2013',
'dota',
'orangebox',
'blade',
'episode1',
'bms',
'darkm',
'swarm',
'bgt',
'eye',
'contagion',
'doi',
'csgo'
'hl2dm'
'nucleardawn'
'l4d2'
'dods'
'l4d'
'css'
'tf2'
'insurgency'
'sdk2013'
'dota'
'orangebox'
'blade'
'episode1'
'bms'
'darkm'
'swarm'
'bgt'
'eye'
'contagion'
'doi'
'pvkii'
'mcv'
)
)