Fixed var names and docs for TF2_MakeBleed native (bug 4928, r=fyren).

This commit is contained in:
Nicholas Hastings 2011-05-24 10:17:48 -04:00
parent e8c141d775
commit d03e051611
2 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@
#include "time.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)
{
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]);
}
CBaseEntity *pTarget;
if (!(pTarget = UTIL_GetCBaseEntity(params[2], true)))
CBaseEntity *pAttacker;
if (!(pAttacker = UTIL_GetCBaseEntity(params[2], true)))
{
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;
vptr += sizeof(void *);
*(CBaseEntity **)vptr = pTarget;
*(CBaseEntity **)vptr = pAttacker;
vptr += sizeof(CBaseEntity *);
*(CBaseEntity **)vptr = NULL;
vptr += sizeof(CBaseEntity *);

View File

@ -228,11 +228,11 @@ native TF2_StunPlayer(client, Float:duration, Float:slowdown=0.0, stunflags, att
* Induces the bleed effect on a client
*
* @param client Player's index.
* @param victim Victim's index.
* @param attacker Attacker's index.
* @param float Duration of bleeding (in seconds).
* @noreturn
*/
native TF2_MakeBleed(client, victim, Float:duration);
native TF2_MakeBleed(client, attacker, Float:duration);
/**
* Retrieves the entity index of the CPlayerResource entity