Use newer MM:S api for Ep1/Original engine. (#548)
* Use newer MM:S api for Ep1/Original engine. * Remove doubled FILENAME_1_6_EP1 define.
This commit is contained in:
committed by
GitHub
parent
d9312799c3
commit
ad3588d0aa
@@ -484,9 +484,6 @@ static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
|
||||
return 10;
|
||||
case SOURCE_ENGINE_EPISODEONE:
|
||||
return 20;
|
||||
|
||||
#if defined METAMOD_PLAPI_VERSION
|
||||
/* Newer games. */
|
||||
case SOURCE_ENGINE_DARKMESSIAH:
|
||||
return 15;
|
||||
case SOURCE_ENGINE_ORANGEBOX:
|
||||
@@ -516,7 +513,6 @@ static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
|
||||
return 70;
|
||||
case SOURCE_ENGINE_CSGO:
|
||||
return 80;
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -525,7 +521,6 @@ static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
|
||||
static cell_t GetEngineVersion(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
int engineVer = g_SMAPI->GetSourceEngineBuild();
|
||||
#if defined METAMOD_PLAPI_VERSION
|
||||
if (engineVer == SOURCE_ENGINE_ORANGEBOXVALVE_DEPRECATED)
|
||||
{
|
||||
const char *gamedir = g_SourceMod.GetGameFolderName();
|
||||
@@ -538,7 +533,6 @@ static cell_t GetEngineVersion(IPluginContext *pContext, const cell_t *params)
|
||||
else if (strcmp(gamedir, "hl2mp") == 0)
|
||||
return SOURCE_ENGINE_HL2DM;
|
||||
}
|
||||
#endif
|
||||
|
||||
return engineVer;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user