removed TF2_Burn and calccritical from 1.0 branch
--HG-- branch : sourcemod-1.0.x extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.0.x%402215
This commit is contained in:
parent
3d1fa83197
commit
f153937038
@ -35,48 +35,6 @@
|
|||||||
#include "RegNatives.h"
|
#include "RegNatives.h"
|
||||||
|
|
||||||
|
|
||||||
// native TF2_Burn(client, target)
|
|
||||||
cell_t TF2_Burn(IPluginContext *pContext, const cell_t *params)
|
|
||||||
{
|
|
||||||
static ICallWrapper *pWrapper = NULL;
|
|
||||||
|
|
||||||
// CTFPlayerShared::Burn(CTFPlayer*)
|
|
||||||
if (!pWrapper)
|
|
||||||
{
|
|
||||||
REGISTER_NATIVE_ADDR("Burn",
|
|
||||||
PassInfo pass[1]; \
|
|
||||||
pass[0].flags = PASSFLAG_BYVAL; \
|
|
||||||
pass[0].size = sizeof(CBaseEntity *); \
|
|
||||||
pass[0].type = PassType_Basic; \
|
|
||||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 1))
|
|
||||||
}
|
|
||||||
|
|
||||||
CBaseEntity *pEntity;
|
|
||||||
if (!(pEntity = UTIL_GetCBaseEntity(params[1], true)))
|
|
||||||
{
|
|
||||||
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
|
|
||||||
}
|
|
||||||
|
|
||||||
CBaseEntity *pTarget;
|
|
||||||
if (!(pTarget = UTIL_GetCBaseEntity(params[2], true)))
|
|
||||||
{
|
|
||||||
return pContext->ThrowNativeError("Client index %d is not valid", params[2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
void *obj = (void *)((uint8_t *)pEntity + playerSharedOffset->actual_offset);
|
|
||||||
|
|
||||||
unsigned char vstk[sizeof(void *) + sizeof(CBaseEntity *)];
|
|
||||||
unsigned char *vptr = vstk;
|
|
||||||
|
|
||||||
*(void **)vptr = obj;
|
|
||||||
vptr += sizeof(void *);
|
|
||||||
*(CBaseEntity **)vptr = pTarget;
|
|
||||||
|
|
||||||
pWrapper->Execute(vstk, NULL);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// native TF2_Invuln(client, bool:enabled)
|
// native TF2_Invuln(client, bool:enabled)
|
||||||
cell_t TF2_Invuln(IPluginContext *pContext, const cell_t *params)
|
cell_t TF2_Invuln(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
@ -211,7 +169,6 @@ cell_t TF2_GetClass(IPluginContext *pContext, const cell_t *params)
|
|||||||
|
|
||||||
sp_nativeinfo_t g_TFNatives[] =
|
sp_nativeinfo_t g_TFNatives[] =
|
||||||
{
|
{
|
||||||
{"TF2_IgnitePlayer", TF2_Burn},
|
|
||||||
{"TF2_SetPlayerInvuln", TF2_Invuln},
|
{"TF2_SetPlayerInvuln", TF2_Invuln},
|
||||||
{"TF2_RespawnPlayer", TF2_Respawn},
|
{"TF2_RespawnPlayer", TF2_Respawn},
|
||||||
{"TF2_DisguisePlayer", TF2_Disguise},
|
{"TF2_DisguisePlayer", TF2_Disguise},
|
||||||
|
@ -104,23 +104,6 @@ native TF2_GetResourceEntity();
|
|||||||
*/
|
*/
|
||||||
native TFClassType:TF2_GetClass(const String:classname[]);
|
native TFClassType:TF2_GetClass(const String:classname[]);
|
||||||
|
|
||||||
/**
|
|
||||||
* Called on weapon fire to decide if the current shot should be critical.
|
|
||||||
* Return Plugin_Continue to let the original calculation or return a higher
|
|
||||||
* action to override the decision with the value of 'result'
|
|
||||||
*
|
|
||||||
* @note Since critical shots are also calculated client side any changes made with
|
|
||||||
* this will not show for the shooter. Projectile weapons such as the rocketlauncher
|
|
||||||
* and demoman weapons will show a critical bullet but no critical sound effect.
|
|
||||||
* Bullet hits should appear as expected.
|
|
||||||
*
|
|
||||||
* @param client Client Index.
|
|
||||||
* @param weapon Weapon entity Index.
|
|
||||||
* @param weaponname Classname of the weapon.
|
|
||||||
* @param result Buffer param for the result of the decision.
|
|
||||||
*/
|
|
||||||
forward Action:TF2_CalcIsAttackCritical(client, weapon, String:weaponname[], &bool:result);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Do not edit below this line!
|
* Do not edit below this line!
|
||||||
*/
|
*/
|
||||||
@ -135,3 +118,4 @@ public Extension:__ext_tf2 =
|
|||||||
required = 0,
|
required = 0,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user