From 35eb2f2ce5115637e3b99d8bc2c103af2e2f2710 Mon Sep 17 00:00:00 2001 From: Matt Woodrow Date: Thu, 8 May 2008 23:43:02 +0000 Subject: [PATCH] A sad response to amb1655 - TF2_SetPlayerInvuln is broken and now removed. --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402127 --- extensions/tf2/natives.cpp | 38 +------------------------------------- gamedata/sm-tf2.games.txt | 6 ------ plugins/include/tf2.inc | 9 --------- 3 files changed, 1 insertion(+), 52 deletions(-) diff --git a/extensions/tf2/natives.cpp b/extensions/tf2/natives.cpp index f3220915..81086f8f 100644 --- a/extensions/tf2/natives.cpp +++ b/extensions/tf2/natives.cpp @@ -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) diff --git a/gamedata/sm-tf2.games.txt b/gamedata/sm-tf2.games.txt index 5a14704b..42fd4a62 100644 --- a/gamedata/sm-tf2.games.txt +++ b/gamedata/sm-tf2.games.txt @@ -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" diff --git a/plugins/include/tf2.inc b/plugins/include/tf2.inc index 40cb0ab3..12ccecf7 100644 --- a/plugins/include/tf2.inc +++ b/plugins/include/tf2.inc @@ -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