- added GuessSDKVersion()

- added rendermode and renderfx prop stocks and defines
- added MoveType tag to MOVETYPE defines
- changed Movetype functions to MoveType to use correct SourceMod casing

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401843
This commit is contained in:
David Anderson
2008-01-07 06:59:44 +00:00
parent e1bc3234b2
commit c033f5415a
6 changed files with 182 additions and 26 deletions
+32
View File
@@ -436,6 +436,37 @@ static cell_t smn_IsPlayerAlive(IPluginContext *pContext, const cell_t *params)
}
}
static cell_t GuessSDKVersion(IPluginContext *pContext, const cell_t *params)
{
#if defined METAMOD_PLAPI_VERSION
int version = g_SMAPI->GetSourceEngineBuild();
if (version == SOURCE_ENGINE_ORIGINAL)
{
return 10;
}
else if (version == SOURCE_ENGINE_EPISODEONE)
{
return 20;
}
else if (version == SOURCE_ENGINE_ORANGEBOX)
{
return 30;
}
#else
if (g_HL2.IsOriginalEngine())
{
return 10;
}
else
{
return 20;
}
#endif
return 0;
}
REGISTER_NATIVES(halflifeNatives)
{
{"CreateFakeClient", CreateFakeClient},
@@ -465,5 +496,6 @@ REGISTER_NATIVES(halflifeNatives)
{"PrintHintText", PrintHintText},
{"ShowVGUIPanel", ShowVGUIPanel},
{"IsPlayerAlive", smn_IsPlayerAlive},
{"GuessSDKVersion", GuessSDKVersion},
{NULL, NULL},
};