Added some small fixes for new CStrike patch (2ddc75e24c53) (bug 4732, r=psychonic).
authorDrifter <rgr_02@comcast.net>
Tue Jun 28 20:16:05 2011 -0400 (2011-06-28)
changeset 3322d4c2b9f0e915
parent 3321 cbc679e71d1b
child 3323 21915bed1eed
Added some small fixes for new CStrike patch (2ddc75e24c53) (bug 4732, r=psychonic).
extensions/cstrike/forwards.cpp
extensions/cstrike/msvc8/cstrike.vcproj
plugins/include/cstrike.inc
     1.1 --- a/extensions/cstrike/forwards.cpp	Mon Jun 27 09:35:38 2011 -0400
     1.2 +++ b/extensions/cstrike/forwards.cpp	Tue Jun 28 20:16:05 2011 -0400
     1.3 @@ -22,7 +22,7 @@
     1.4  
     1.5  DETOUR_DECL_MEMBER1(DetourHandleBuy, int, const char *, weapon)
     1.6  {
     1.7 -	int client = engine->IndexOfEdict(engine->PEntityOfEntIndex(gamehelpers->EntityToBCompatRef(reinterpret_cast<CBaseEntity *>(this))));
     1.8 +	int client = gamehelpers->EntityToBCompatRef(reinterpret_cast<CBaseEntity *>(this));
     1.9  
    1.10  	lastclient = client;
    1.11  
    1.12 @@ -100,8 +100,8 @@
    1.13  		return;
    1.14  	}
    1.15  
    1.16 -	int client = engine->IndexOfEdict(engine->PEntityOfEntIndex(gamehelpers->EntityToBCompatRef(reinterpret_cast<CBaseEntity *>(this))));
    1.17 -	int weaponIndex = engine->IndexOfEdict(engine->PEntityOfEntIndex(gamehelpers->EntityToBCompatRef(weapon)));
    1.18 +	int client = gamehelpers->EntityToBCompatRef(reinterpret_cast<CBaseEntity *>(this));
    1.19 +	int weaponIndex = gamehelpers->EntityToBCompatRef(weapon);
    1.20  
    1.21  	cell_t result = Pl_Continue;
    1.22  	g_pCSWeaponDropForward->PushCell(client);
     2.1 --- a/extensions/cstrike/msvc8/cstrike.vcproj	Mon Jun 27 09:35:38 2011 -0400
     2.2 +++ b/extensions/cstrike/msvc8/cstrike.vcproj	Tue Jun 28 20:16:05 2011 -0400
     2.3 @@ -518,6 +518,10 @@
     2.4  				>
     2.5  			</File>
     2.6  			<File
     2.7 +				RelativePath="..\forwards.cpp"
     2.8 +				>
     2.9 +			</File>
    2.10 +			<File
    2.11  				RelativePath="..\natives.cpp"
    2.12  				>
    2.13  			</File>
    2.14 @@ -540,6 +544,10 @@
    2.15  				>
    2.16  			</File>
    2.17  			<File
    2.18 +				RelativePath="..\forwards.h"
    2.19 +				>
    2.20 +			</File>
    2.21 +			<File
    2.22  				RelativePath="..\RegNatives.h"
    2.23  				>
    2.24  			</File>
    2.25 @@ -575,6 +583,34 @@
    2.26  				>
    2.27  			</File>
    2.28  		</Filter>
    2.29 +		<Filter
    2.30 +			Name="asm"
    2.31 +			>
    2.32 +			<File
    2.33 +				RelativePath="..\asm\asm.c"
    2.34 +				>
    2.35 +			</File>
    2.36 +			<File
    2.37 +				RelativePath="..\asm\asm.h"
    2.38 +				>
    2.39 +			</File>
    2.40 +		</Filter>
    2.41 +		<Filter
    2.42 +			Name="CDetour"
    2.43 +			>
    2.44 +			<File
    2.45 +				RelativePath="..\CDetour\detourhelpers.h"
    2.46 +				>
    2.47 +			</File>
    2.48 +			<File
    2.49 +				RelativePath="..\CDetour\detours.cpp"
    2.50 +				>
    2.51 +			</File>
    2.52 +			<File
    2.53 +				RelativePath="..\CDetour\detours.h"
    2.54 +				>
    2.55 +			</File>
    2.56 +		</Filter>
    2.57  	</Files>
    2.58  	<Globals>
    2.59  	</Globals>
     3.1 --- a/plugins/include/cstrike.inc	Mon Jun 27 09:35:38 2011 -0400
     3.2 +++ b/plugins/include/cstrike.inc	Tue Jun 28 20:16:05 2011 -0400
     3.3 @@ -95,6 +95,8 @@
     3.4   * @param client	Client index
     3.5   * @param weapon	Weapon classname
     3.6   * @param price		Buffer param for the price of the weapon
     3.7 + *
     3.8 + * @note			Not all "weapons" call GetWeaponPrice. Example: c4, knife, vest, vest helmet, night vision.
     3.9   */
    3.10  forward Action:CS_OnGetWeaponPrice(client, const String:weapon[], &price);
    3.11