A sad response to amb1655 - TF2_SetPlayerInvuln is broken and now removed.
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402127
This commit is contained in:
parent
2030ef9114
commit
35eb2f2ce5
@ -80,43 +80,7 @@ cell_t TF2_Burn(IPluginContext *pContext, const cell_t *params)
|
||||
// native TF2_Invuln(client, bool:enabled)
|
||||
cell_t TF2_Invuln(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
static ICallWrapper *pWrapper = NULL;
|
||||
|
||||
//CTFPlayerShared::SetInvulnerable(bool, bool)
|
||||
if (!pWrapper)
|
||||
{
|
||||
REGISTER_NATIVE_ADDR("Invuln",
|
||||
PassInfo pass[2]; \
|
||||
pass[0].flags = PASSFLAG_BYVAL; \
|
||||
pass[0].size = sizeof(bool); \
|
||||
pass[0].type = PassType_Basic; \
|
||||
pass[1].flags = PASSFLAG_BYVAL; \
|
||||
pass[1].size = sizeof(bool); \
|
||||
pass[1].type = PassType_Basic; \
|
||||
pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 2))
|
||||
}
|
||||
|
||||
CBaseEntity *pEntity;
|
||||
if (!(pEntity = UTIL_GetCBaseEntity(params[1], true)))
|
||||
{
|
||||
return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
|
||||
}
|
||||
|
||||
void *obj = (void *)((uint8_t *)pEntity + playerSharedOffset->actual_offset);
|
||||
|
||||
unsigned char vstk[sizeof(void *) + 2*sizeof(bool)];
|
||||
unsigned char *vptr = vstk;
|
||||
|
||||
|
||||
*(void **)vptr = obj;
|
||||
vptr += sizeof(void *);
|
||||
*(bool *)vptr = !!params[2];
|
||||
vptr += sizeof(bool);
|
||||
*(bool *)vptr = true;
|
||||
|
||||
pWrapper->Execute(vstk, NULL);
|
||||
|
||||
return 1;
|
||||
return pContext->ThrowNativeError("TF2_SetPlayerInvuln is no longer available");
|
||||
}
|
||||
|
||||
cell_t TF2_Disguise(IPluginContext *pContext, const cell_t *params)
|
||||
|
@ -10,12 +10,6 @@
|
||||
"windows" "\x56\x8B\xF1\x8B\x4E\x7C\x8B\x01\x8B\x90\xF8\x00\x00\x00\xFF\xD2\x84\xC0\x2A\x2A\x2A\x2A\x2A\x2A\x8B\x46\x7C"
|
||||
"linux" "@_ZN15CTFPlayerShared4BurnEP9CTFPlayer"
|
||||
}
|
||||
"Invuln"
|
||||
{
|
||||
"library" "server"
|
||||
"windows" "\x8A\x44\x24\x04\x83\xEC\x20\x56\x8B\xF1\x8B\x4E\x08\x57\x8D\x7E\x08\xC1\xE9\x05\x80\xE1\x01\x3A\xC8\x75\x32\x84\xC0"
|
||||
"linux" "@_ZN15CTFPlayerShared15SetInvulnerableEbb"
|
||||
}
|
||||
"RemoveDisguise"
|
||||
{
|
||||
"library" "server"
|
||||
|
@ -57,15 +57,6 @@ enum TFTeam
|
||||
TFTeam_Blue = 3
|
||||
};
|
||||
|
||||
/**
|
||||
* Set's a Clients invulnrability status (ubercharge effect)
|
||||
*
|
||||
* @param client Player's index.
|
||||
* @param enabled Enable/Disable invulnrability.
|
||||
* @noreturn
|
||||
* @error Invalid client index, client not in game, or no mod support.
|
||||
*/
|
||||
native TF2_SetPlayerInvuln(client, bool:enabled);
|
||||
|
||||
/**
|
||||
* Respawns a client
|
||||
|
Loading…
Reference in New Issue
Block a user