1.1 --- a/core/smn_halflife.cpp Mon Jul 29 10:03:18 2013 -0400
1.2 +++ b/core/smn_halflife.cpp Sun Jul 21 11:53:56 2013 -0400
1.3 @@ -72,7 +72,7 @@
1.4
1.5 static cell_t GetEngineTime(IPluginContext *pContext, const cell_t *params)
1.6 {
1.7 -#if SOURCE_ENGINE >= SE_LEFT4DEAD2
1.8 +#if SOURCE_ENGINE >= SE_NUCLEARDAWN
1.9 float fTime = Plat_FloatTime();
1.10 #else
1.11 float fTime = engine->Time();
1.12 @@ -493,10 +493,13 @@
1.13 return 33;
1.14 case SOURCE_ENGINE_CSS:
1.15 return 34;
1.16 - case SOURCE_ENGINE_ORANGEBOXVALVE:
1.17 + case SOURCE_ENGINE_HL2DM:
1.18 + case SOURCE_ENGINE_DODS:
1.19 + case SOURCE_ENGINE_TF2:
1.20 return 35;
1.21 case SOURCE_ENGINE_LEFT4DEAD:
1.22 return 40;
1.23 + case SOURCE_ENGINE_NUCLEARDAWN:
1.24 case SOURCE_ENGINE_LEFT4DEAD2:
1.25 return 50;
1.26 case SOURCE_ENGINE_ALIENSWARM:
1.27 @@ -523,6 +526,11 @@
1.28 return 0;
1.29 }
1.30
1.31 +static cell_t GetEngineVersion(IPluginContext *pContext, const cell_t *params)
1.32 +{
1.33 + return g_SMAPI->GetSourceEngineBuild();
1.34 +}
1.35 +
1.36 static cell_t IndexToReference(IPluginContext *pContext, const cell_t *params)
1.37 {
1.38 if (params[1] >= NUM_ENT_ENTRIES || params[1] < 0)
1.39 @@ -574,6 +582,7 @@
1.40 {"ShowVGUIPanel", ShowVGUIPanel},
1.41 {"IsPlayerAlive", smn_IsPlayerAlive},
1.42 {"GuessSDKVersion", GuessSDKVersion},
1.43 + {"GetEngineVersion", GetEngineVersion},
1.44 {"EntIndexToEntRef", IndexToReference},
1.45 {"EntRefToEntIndex", ReferenceToIndex},
1.46 {"MakeCompatEntRef", ReferenceToBCompatRef},