From 8d60f6eb64fc936159721514835da35055a47e6f Mon Sep 17 00:00:00 2001 From: BotoX Date: Tue, 26 Sep 2017 15:06:41 +0200 Subject: [PATCH] fix mistake --- extension.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/extension.cpp b/extension.cpp index c710230..7dfc849 100644 --- a/extension.cpp +++ b/extension.cpp @@ -272,10 +272,10 @@ SH_DECL_HOOK2(CTraceFilterSimple, ShouldHitEntity, SH_NOATTRIB, 0, bool, IHandle bool ShouldHitEntity(IHandleEntity *pHandleEntity, int contentsMask) { if(!gv_InFireBullets) - return true; + RETURN_META_VALUE(MRES_IGNORED, true); if(META_RESULT_ORIG_RET(bool) == false) - return false; + RETURN_META_VALUE(MRES_IGNORED, false); IServerUnknown *pUnk = (IServerUnknown *)pHandleEntity; @@ -302,23 +302,23 @@ bool ShouldHitEntity(IHandleEntity *pHandleEntity, int contentsMask) RETURN_META_VALUE(MRES_IGNORED, true); } -DETOUR_DECL_STATIC7(DETOUR_FireBullets, void, int, iPlayerIndex, const Vector *, vOrigin, const QAngle *, vAngles, int, iWeaponID, int, iMode, int, iSeed, float, flSpread) +DETOUR_DECL_STATIC9(DETOUR_FireBullets, void, int, iPlayerIndex, const Vector *, vOrigin, const QAngle *, vAngles, int, iWeaponID, int, iMode, int, iSeed, float, flSpread, float, _f1, float, _f2) { if(iPlayerIndex <= 0 || iPlayerIndex > playerhelpers->GetMaxClients()) - return DETOUR_STATIC_CALL(DETOUR_FireBullets)(iPlayerIndex, vOrigin, vAngles, iWeaponID, iMode, iSeed, flSpread); + return DETOUR_STATIC_CALL(DETOUR_FireBullets)(iPlayerIndex, vOrigin, vAngles, iWeaponID, iMode, iSeed, flSpread, _f1, _f2); IGamePlayer *pPlayer = playerhelpers->GetGamePlayer(iPlayerIndex); if(!pPlayer) - return DETOUR_STATIC_CALL(DETOUR_FireBullets)(iPlayerIndex, vOrigin, vAngles, iWeaponID, iMode, iSeed, flSpread); + return DETOUR_STATIC_CALL(DETOUR_FireBullets)(iPlayerIndex, vOrigin, vAngles, iWeaponID, iMode, iSeed, flSpread, _f1, _f2); IPlayerInfo *pInfo = pPlayer->GetPlayerInfo(); if(!pInfo) - return DETOUR_STATIC_CALL(DETOUR_FireBullets)(iPlayerIndex, vOrigin, vAngles, iWeaponID, iMode, iSeed, flSpread); + return DETOUR_STATIC_CALL(DETOUR_FireBullets)(iPlayerIndex, vOrigin, vAngles, iWeaponID, iMode, iSeed, flSpread, _f1, _f2); gv_FireBulletPlayerTeam = pInfo->GetTeamIndex(); gv_InFireBullets = true; - DETOUR_STATIC_CALL(DETOUR_FireBullets)(iPlayerIndex, vOrigin, vAngles, iWeaponID, iMode, iSeed, flSpread); + DETOUR_STATIC_CALL(DETOUR_FireBullets)(iPlayerIndex, vOrigin, vAngles, iWeaponID, iMode, iSeed, flSpread, _f1, _f2); gv_InFireBullets = false; }