From 72088a000b6fc0d641f5b94f6aa6586e9e2d9e8b Mon Sep 17 00:00:00 2001 From: Sergeanur Date: Fri, 14 Aug 2020 19:42:15 +0300 Subject: Don't react if player's targeting with melee --- src/peds/Ped.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/peds/Ped.cpp b/src/peds/Ped.cpp index f52b373e..a15927ff 100644 --- a/src/peds/Ped.cpp +++ b/src/peds/Ped.cpp @@ -10232,7 +10232,11 @@ CPed::ProcessControl(void) CPed::Chat(); break; case PED_AIM_GUN: - if (m_pPointGunAt && m_pPointGunAt->IsPed() && ((CPed*)m_pPointGunAt)->CanSeeEntity(this, CAN_SEE_ENTITY_ANGLE_THRESHOLD * 2)) { + if (m_pPointGunAt && m_pPointGunAt->IsPed() +#ifdef FIX_BUGS + && !GetWeapon()->IsTypeMelee() +#endif + && ((CPed*)m_pPointGunAt)->CanSeeEntity(this, CAN_SEE_ENTITY_ANGLE_THRESHOLD * 2)) { ((CPed*)m_pPointGunAt)->ReactToPointGun(this); } PointGunAt(); -- cgit v1.2.3