From 3780671ff682f6f4ef647f788fab956d7719b2be Mon Sep 17 00:00:00 2001 From: Luke Street Date: Sun, 13 Sep 2020 19:36:28 -0400 Subject: [PATCH] CDrone: Check minAttackRange in InRange --- Runtime/MP1/World/CDrone.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Runtime/MP1/World/CDrone.cpp b/Runtime/MP1/World/CDrone.cpp index 543b028c4..56295517f 100644 --- a/Runtime/MP1/World/CDrone.cpp +++ b/Runtime/MP1/World/CDrone.cpp @@ -793,7 +793,8 @@ bool CDrone::Leash(CStateManager& mgr, float arg) { } bool CDrone::InRange(CStateManager& mgr, float arg) { - return (mgr.GetPlayer().GetTranslation() - GetTranslation()).magSquared() < x300_maxAttackRange * x300_maxAttackRange; + float mag = (mgr.GetPlayer().GetTranslation() - GetTranslation()).magSquared(); + return mag > x2fc_minAttackRange * x2fc_minAttackRange && mag < x300_maxAttackRange * x300_maxAttackRange; } bool CDrone::SpotPlayer(CStateManager& mgr, float arg) {