Added some small fixes for new CStrike patch (2ddc75e24c53) (bug 4732, r=psychonic).

This commit is contained in:
Drifter 2011-06-28 20:16:05 -04:00
parent 52ec8bf049
commit c4c554b420
3 changed files with 41 additions and 3 deletions

View File

@ -22,7 +22,7 @@ int weaponNameOffset = -1;
DETOUR_DECL_MEMBER1(DetourHandleBuy, int, const char *, weapon)
{
int client = engine->IndexOfEdict(engine->PEntityOfEntIndex(gamehelpers->EntityToBCompatRef(reinterpret_cast<CBaseEntity *>(this))));
int client = gamehelpers->EntityToBCompatRef(reinterpret_cast<CBaseEntity *>(this));
lastclient = client;
@ -100,8 +100,8 @@ DETOUR_DECL_MEMBER3(DetourCSWeaponDrop, void, CBaseEntity *, weapon, bool, somet
return;
}
int client = engine->IndexOfEdict(engine->PEntityOfEntIndex(gamehelpers->EntityToBCompatRef(reinterpret_cast<CBaseEntity *>(this))));
int weaponIndex = engine->IndexOfEdict(engine->PEntityOfEntIndex(gamehelpers->EntityToBCompatRef(weapon)));
int client = gamehelpers->EntityToBCompatRef(reinterpret_cast<CBaseEntity *>(this));
int weaponIndex = gamehelpers->EntityToBCompatRef(weapon);
cell_t result = Pl_Continue;
g_pCSWeaponDropForward->PushCell(client);

View File

@ -517,6 +517,10 @@
RelativePath="..\extension.cpp"
>
</File>
<File
RelativePath="..\forwards.cpp"
>
</File>
<File
RelativePath="..\natives.cpp"
>
@ -539,6 +543,10 @@
RelativePath="..\extension.h"
>
</File>
<File
RelativePath="..\forwards.h"
>
</File>
<File
RelativePath="..\RegNatives.h"
>
@ -575,6 +583,34 @@
>
</File>
</Filter>
<Filter
Name="asm"
>
<File
RelativePath="..\asm\asm.c"
>
</File>
<File
RelativePath="..\asm\asm.h"
>
</File>
</Filter>
<Filter
Name="CDetour"
>
<File
RelativePath="..\CDetour\detourhelpers.h"
>
</File>
<File
RelativePath="..\CDetour\detours.cpp"
>
</File>
<File
RelativePath="..\CDetour\detours.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>

View File

@ -95,6 +95,8 @@ forward Action:CS_OnCSWeaponDrop(client, weaponIndex);
* @param client Client index
* @param weapon Weapon classname
* @param price Buffer param for the price of the weapon
*
* @note Not all "weapons" call GetWeaponPrice. Example: c4, knife, vest, vest helmet, night vision.
*/
forward Action:CS_OnGetWeaponPrice(client, const String:weapon[], &price);