extensions/tf2/natives.cpp
changeset 2039 cdf621aae4a9
parent 1963 97a66409edac
child 2097 0a56b8faac9c
     1.1 --- a/extensions/tf2/natives.cpp	Sun May 04 15:52:34 2008 +0000
     1.2 +++ b/extensions/tf2/natives.cpp	Thu May 08 23:43:02 2008 +0000
     1.3 @@ -80,43 +80,7 @@
     1.4  // native TF2_Invuln(client, bool:enabled)
     1.5  cell_t TF2_Invuln(IPluginContext *pContext, const cell_t *params)
     1.6  {
     1.7 -	static ICallWrapper *pWrapper = NULL;
     1.8 -
     1.9 -	//CTFPlayerShared::SetInvulnerable(bool, bool)
    1.10 -	if (!pWrapper)
    1.11 -	{
    1.12 -		REGISTER_NATIVE_ADDR("Invuln", 
    1.13 -			PassInfo pass[2]; \
    1.14 -			pass[0].flags = PASSFLAG_BYVAL; \
    1.15 -			pass[0].size = sizeof(bool); \
    1.16 -			pass[0].type = PassType_Basic; \
    1.17 -			pass[1].flags = PASSFLAG_BYVAL; \
    1.18 -			pass[1].size = sizeof(bool); \
    1.19 -			pass[1].type = PassType_Basic; \
    1.20 -			pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 2))
    1.21 -	}
    1.22 -
    1.23 -	CBaseEntity *pEntity;
    1.24 -	if (!(pEntity = UTIL_GetCBaseEntity(params[1], true)))
    1.25 -	{
    1.26 -		return pContext->ThrowNativeError("Client index %d is not valid", params[1]);
    1.27 -	}
    1.28 -
    1.29 -	void *obj = (void *)((uint8_t *)pEntity + playerSharedOffset->actual_offset);
    1.30 -
    1.31 -	unsigned char vstk[sizeof(void *) + 2*sizeof(bool)];
    1.32 -	unsigned char *vptr = vstk;
    1.33 -
    1.34 -
    1.35 -	*(void **)vptr = obj;
    1.36 -	vptr += sizeof(void *);
    1.37 -	*(bool *)vptr = !!params[2];
    1.38 -	vptr += sizeof(bool);
    1.39 -	*(bool *)vptr = true;
    1.40 -
    1.41 -	pWrapper->Execute(vstk, NULL);
    1.42 -
    1.43 -	return 1;
    1.44 +	return pContext->ThrowNativeError("TF2_SetPlayerInvuln is no longer available");
    1.45  }
    1.46  
    1.47  cell_t TF2_Disguise(IPluginContext *pContext, const cell_t *params)