Updated more TF2 gamedata and fixed RemoveCondition call (bug 4641, r=fyren).
authorNicholas Hastings <skamonkey@gmail.com>
Fri Oct 01 09:07:51 2010 -0400 (2010-10-01)
changeset 312798e961593ddf
parent 3126 a9712a50569b
child 3128 337f190aaf4b
Updated more TF2 gamedata and fixed RemoveCondition call (bug 4641, r=fyren).
extensions/tf2/natives.cpp
gamedata/sm-tf2.games.txt
     1.1 --- a/extensions/tf2/natives.cpp	Fri Oct 01 08:50:18 2010 -0400
     1.2 +++ b/extensions/tf2/natives.cpp	Fri Oct 01 09:07:51 2010 -0400
     1.3 @@ -258,11 +258,14 @@
     1.4  	if (!pWrapper)
     1.5  	{
     1.6  		REGISTER_NATIVE_ADDR("RemoveCondition", 
     1.7 -			PassInfo pass[1]; \
     1.8 +			PassInfo pass[2]; \
     1.9  			pass[0].flags = PASSFLAG_BYVAL; \
    1.10  			pass[0].size = sizeof(int); \
    1.11  			pass[0].type = PassType_Basic; \
    1.12 -			pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 1))
    1.13 +			pass[1].flags = PASSFLAG_BYVAL; \
    1.14 +			pass[1].size = sizeof(bool); \
    1.15 +			pass[1].type = PassType_Basic; \
    1.16 +			pWrapper = g_pBinTools->CreateCall(addr, CallConv_ThisCall, NULL, pass, 2))
    1.17  	}
    1.18  
    1.19  	CBaseEntity *pEntity;
    1.20 @@ -273,12 +276,14 @@
    1.21  
    1.22  	void *obj = (void *)((uint8_t *)pEntity + playerSharedOffset->actual_offset);
    1.23  
    1.24 -	unsigned char vstk[sizeof(void *) + sizeof(int)];
    1.25 +	unsigned char vstk[sizeof(void *) + sizeof(int) + sizeof(bool)];
    1.26  	unsigned char *vptr = vstk;
    1.27  
    1.28  	*(void **)vptr = obj;
    1.29  	vptr += sizeof(void *);
    1.30  	*(int *)vptr = params[2];
    1.31 +	vptr += sizeof(int);
    1.32 +	*(bool *)vptr = false;
    1.33  
    1.34  	pWrapper->Execute(vstk, NULL);
    1.35  
     2.1 --- a/gamedata/sm-tf2.games.txt	Fri Oct 01 08:50:18 2010 -0400
     2.2 +++ b/gamedata/sm-tf2.games.txt	Fri Oct 01 09:07:51 2010 -0400
     2.3 @@ -18,21 +18,21 @@
     2.4  			"Burn"
     2.5  			{
     2.6  				"library"	"server"
     2.7 -				"windows"	"\x56\x8B\xF1\x8B\x8E\x2A\x2A\x00\x00\x8B\x01\x8B\x90\x2A\x2A\x00\x00\xFF\xD2\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x8B\x2A\x2A\x2A\x2A\x2A\x8B\xC8\xC1"
     2.8 +				"windows"	"\x51\x56\x8B\xF1\x8B\x8E\x2A\x2A\x00\x00\x8B\x01\x8B\x90\x2A\x2A\x00\x00\xFF\xD2\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x57\x8D\xBE\x2A\x2A\x2A\x2A\x6A"
     2.9  				"linux"		"@_ZN15CTFPlayerShared4BurnEP9CTFPlayerP13CTFWeaponBase"
    2.10  				"mac"		"@_ZN15CTFPlayerShared4BurnEP9CTFPlayerP13CTFWeaponBase"
    2.11  			}
    2.12  			"RemoveDisguise"
    2.13  			{
    2.14  				"library"	"server"
    2.15 -				"windows"	"\x51\x56\x8B\xF1\x8B\x2A\x2A\x2A\x2A\x2A\x57\x8B\x2A\x2A\x2A\x2A\x2A\xE8\x2A\x2A\x2A\x2A\x3B\xF8"
    2.16 +				"windows"	"\x83\xEC\x2A\x53\x56\x8B\xF1\x8B\x8E\x2A\x2A\x2A\x2A\x57\x8B\xBE\x2A\x2A\x2A\x2A\xE8"
    2.17  				"linux"		"@_ZN15CTFPlayerShared14RemoveDisguiseEv"
    2.18  				"mac"		"@_ZN15CTFPlayerShared14RemoveDisguiseEv"
    2.19  			}
    2.20  			"Disguise"
    2.21  			{
    2.22  				"library"	"server"
    2.23 -				"windows"	"\x56\x8B\xF1\x8B\x8E\x2A\x2A\x00\x00\xE8\x2A\x2A\x2A\x2A\x8B\x8E\x2A\x2A\x00\x00\x8B\x89\x2A\x2A\x00\x00"
    2.24 +				"windows"	"\x51\x53\x56\x8B\xF1\x8B\x8E\x2A\x2A\x00\x00\xE8\x2A\x2A\x2A\x2A\x8B\xD8\x8B\x86\x2A\x2A\x00\x00\x8B\x80"
    2.25  				"linux"		"@_ZN15CTFPlayerShared8DisguiseEii"
    2.26  				"mac"		"@_ZN15CTFPlayerShared8DisguiseEii"
    2.27  			}
    2.28 @@ -67,16 +67,16 @@
    2.29  			"AddCondition"
    2.30  			{
    2.31  				"library"	"server"
    2.32 -				"windows"	"\x56\x57\x8B\x7C\x2A\x2A\x8B\xF1\x8B\xCF\xBA\x01\x00\x00\x00\xD3\xE2\x8D\x86\x2A\x2A\x2A\x2A\x8D\x4C\x2A\x2A\x51\x0B\x10\x8B"
    2.33 +				"windows"	"\xD9\x44\x2A\x2A\x56\x57\x8B\x7C\x2A\x2A\x8B\xF1\x8B\x86\x2A\x2A\x2A\x00\x50\x51\xD9\x2A\x2A\x57"
    2.34  				"linux"		"@_ZN15CTFPlayerShared7AddCondEif"
    2.35  				"mac"		"@_ZN15CTFPlayerShared7AddCondEif"
    2.36  			}
    2.37  			"RemoveCondition"
    2.38  			{
    2.39  				"library"	"server"
    2.40 -				"windows"	"\x56\x57\x8B\x7C\x2A\x2A\x8B\xF1\x8B\xCF\xBA\x01\x00\x00\x00\xD3\xE2\x8D\x86\x2A\x2A\x2A\x2A\x8D\x4C\x2A\x2A\x51\xF7\xD2\x23"
    2.41 -				"linux"		"@_ZN15CTFPlayerShared10RemoveCondEi"
    2.42 -				"mac"		"@_ZN15CTFPlayerShared10RemoveCondEi"
    2.43 +				"windows"	"\x8B\x44\x2A\x2A\x56\x57\x8B\x7C\x2A\x2A\x8B\xF1\x50\x57\x8D\x8E\x2A\x2A\x2A\x2A\xE8"
    2.44 +				"linux"		"@_ZN15CTFPlayerShared10RemoveCondEib"
    2.45 +				"mac"		"@_ZN15CTFPlayerShared10RemoveCondEib"
    2.46  			}
    2.47  			"SetPowerplayEnabled"
    2.48  			{
    2.49 @@ -88,7 +88,7 @@
    2.50  			"StunPlayer"
    2.51  			{
    2.52  				"library"	"server"
    2.53 -				"windows"	"\x51\xD9\x2A\x2A\x2A\x2A\x2A\x56\x83\xEC\x2A\xD9\x2A\x2A\x2A\x8B\xF1\xD9\xEE\xD9\x2A\x2A\x2A\xD9\xE8"
    2.54 +				"windows"	"\x51\xD9\x2A\x2A\x2A\x2A\x2A\x56\x57\x83\xEC\x2A\xD9\x2A\x2A\x2A\x8B\xF1\xD9\xEE\xD9\x2A\x2A\x2A\xD9\xE8\xD9"
    2.55  				"linux"		"@_ZN15CTFPlayerShared10StunPlayerEffiP9CTFPlayer"
    2.56  				"mac"		"@_ZN15CTFPlayerShared10StunPlayerEffiP9CTFPlayer"
    2.57  			}
    2.58 @@ -102,7 +102,7 @@
    2.59  			"MakeBleed"
    2.60  			{
    2.61  				"library" 	"server"
    2.62 -				"windows"	"\x56\x8B\xF1\x8B\x8E\x2A\x2A\x2A\x2A\x8B\x2A\x8B\x90\x2A\x2A\x2A\x2A\xFF\xD2\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x8B\x86\x2A\x2A\x2A\x2A\xC1"
    2.63 +				"windows"	"\x51\x56\x8B\xF1\x8B\x8E\x2A\x2A\x2A\x2A\x8B\x01\x8B\x90\x2A\x2A\x2A\x2A\xFF\xD2\x84\xC0\x0F\x2A\x2A\x2A\x2A\x2A\x6A\x19\x8D"
    2.64  				"linux"		"@_ZN15CTFPlayerShared9MakeBleedEP9CTFPlayerP13CTFWeaponBasef"
    2.65  				"mac"		"@_ZN15CTFPlayerShared9MakeBleedEP9CTFPlayerP13CTFWeaponBasef"
    2.66  			}