Fixed var names and docs for TF2_MakeBleed native (bug 4928, r=fyren).
This commit is contained in:
parent
e8c141d775
commit
d03e051611
@ -34,7 +34,7 @@
|
|||||||
#include "time.h"
|
#include "time.h"
|
||||||
#include "RegNatives.h"
|
#include "RegNatives.h"
|
||||||
|
|
||||||
// native TF2_MakeBleed(client, victim, Float:duration)
|
// native TF2_MakeBleed(client, attacker, Float:duration)
|
||||||
cell_t TF2_MakeBleed(IPluginContext *pContext, const cell_t *params)
|
cell_t TF2_MakeBleed(IPluginContext *pContext, const cell_t *params)
|
||||||
{
|
{
|
||||||
static ICallWrapper *pWrapper = NULL;
|
static ICallWrapper *pWrapper = NULL;
|
||||||
@ -62,8 +62,8 @@ cell_t TF2_MakeBleed(IPluginContext *pContext, const cell_t *params)
|
|||||||
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
|
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
CBaseEntity *pTarget;
|
CBaseEntity *pAttacker;
|
||||||
if (!(pTarget = UTIL_GetCBaseEntity(params[2], true)))
|
if (!(pAttacker = UTIL_GetCBaseEntity(params[2], true)))
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Client index %d is not valid", params[2]);
|
return pContext->ThrowNativeError("Client index %d is not valid", params[2]);
|
||||||
}
|
}
|
||||||
@ -75,7 +75,7 @@ cell_t TF2_MakeBleed(IPluginContext *pContext, const cell_t *params)
|
|||||||
|
|
||||||
*(void **)vptr = obj;
|
*(void **)vptr = obj;
|
||||||
vptr += sizeof(void *);
|
vptr += sizeof(void *);
|
||||||
*(CBaseEntity **)vptr = pTarget;
|
*(CBaseEntity **)vptr = pAttacker;
|
||||||
vptr += sizeof(CBaseEntity *);
|
vptr += sizeof(CBaseEntity *);
|
||||||
*(CBaseEntity **)vptr = NULL;
|
*(CBaseEntity **)vptr = NULL;
|
||||||
vptr += sizeof(CBaseEntity *);
|
vptr += sizeof(CBaseEntity *);
|
||||||
|
@ -228,11 +228,11 @@ native TF2_StunPlayer(client, Float:duration, Float:slowdown=0.0, stunflags, att
|
|||||||
* Induces the bleed effect on a client
|
* Induces the bleed effect on a client
|
||||||
*
|
*
|
||||||
* @param client Player's index.
|
* @param client Player's index.
|
||||||
* @param victim Victim's index.
|
* @param attacker Attacker's index.
|
||||||
* @param float Duration of bleeding (in seconds).
|
* @param float Duration of bleeding (in seconds).
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
native TF2_MakeBleed(client, victim, Float:duration);
|
native TF2_MakeBleed(client, attacker, Float:duration);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the entity index of the CPlayerResource entity
|
* Retrieves the entity index of the CPlayerResource entity
|
||||||
|
Loading…
Reference in New Issue
Block a user