updated sdktools support for tf2

--HG--
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401603
This commit is contained in:
David Anderson
2007-10-17 01:44:46 +00:00
parent adfea8ade8
commit ca4ca95bfd
3 changed files with 161 additions and 2 deletions
+30
View File
@@ -288,6 +288,35 @@ static cell_t TeleportEntity(IPluginContext *pContext, const cell_t *params)
return 1;
}
#if defined ORANGEBOX_BUILD
/* :TODO: This is Team Fortress 2 specific */
static cell_t ForcePlayerSuicide(IPluginContext *pContext, const cell_t *params)
{
static ValveCall *pCall = NULL;
if (!pCall)
{
ValvePassInfo pass[2];
InitPass(pass[0], Valve_Bool, PassType_Basic, PASSFLAG_BYVAL);
InitPass(pass[1], Valve_Bool, PassType_Basic, PASSFLAG_BYVAL);
if (!CreateBaseCall("CommitSuicide", ValveCall_Player, NULL, pass, 2, &pCall))
{
return pContext->ThrowNativeError("\"CommitSuicide\" not supported by this mod");
}
else if (!pCall)
{
return pContext->ThrowNativeError("\"CommitSuicide\" wrapper failed to initialized");
}
}
START_CALL();
DECODE_VALVE_PARAM(1, thisinfo, 0);
*(bool *)(vptr + 4) = false;
*(bool *)(vptr + 5) = false;
FINISH_CALL_SIMPLE(NULL);
return 1;
}
#else
static cell_t ForcePlayerSuicide(IPluginContext *pContext, const cell_t *params)
{
static ValveCall *pCall = NULL;
@@ -307,6 +336,7 @@ static cell_t ForcePlayerSuicide(IPluginContext *pContext, const cell_t *params)
return 1;
}
#endif
static cell_t SetClientViewEntity(IPluginContext *pContext, const cell_t *params)
{