From e74d5593a8542ee607dfb35dc2d454cbef02dece Mon Sep 17 00:00:00 2001 From: Nicholas Hastings Date: Wed, 23 Jan 2013 14:46:12 -0500 Subject: [PATCH] Updated CS:GO HandleCommand_Buy_Internal detour with new bool param. --- extensions/cstrike/forwards.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/extensions/cstrike/forwards.cpp b/extensions/cstrike/forwards.cpp index 19533608a..3404ba160 100644 --- a/extensions/cstrike/forwards.cpp +++ b/extensions/cstrike/forwards.cpp @@ -21,7 +21,11 @@ CDetour *DCSWeaponDrop = NULL; int weaponNameOffset = -1; +#if SOURCE_ENGINE == SE_CSGO +DETOUR_DECL_MEMBER2(DetourHandleBuy, int, const char *, weapon, bool, bRebuy) +#else DETOUR_DECL_MEMBER1(DetourHandleBuy, int, const char *, weapon) +#endif { int client = gamehelpers->EntityToBCompatRef(reinterpret_cast(this)); @@ -45,9 +49,12 @@ DETOUR_DECL_MEMBER1(DetourHandleBuy, int, const char *, weapon) { defaultprice = CallPriceForwardCSGO(client, weapon); } + + int val = DETOUR_MEMBER_CALL(DetourHandleBuy)(weapon, bRebuy); +#else + int val = DETOUR_MEMBER_CALL(DetourHandleBuy)(weapon); #endif - int val = DETOUR_MEMBER_CALL(DetourHandleBuy)(weapon); #if SOURCE_ENGINE == SE_CSGO if (defaultprice != -1)