From def6eee63c47738d8eee6c027b90df293b579a4d Mon Sep 17 00:00:00 2001 From: Bob Date: Sat, 3 Apr 2010 00:49:42 +1200 Subject: [PATCH] fix half of the "range-2" bug. --- OpenRA.Game/Traits/Attack/AttackBase.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/OpenRA.Game/Traits/Attack/AttackBase.cs b/OpenRA.Game/Traits/Attack/AttackBase.cs index 709c30db1d..b0ec02a3d3 100755 --- a/OpenRA.Game/Traits/Attack/AttackBase.cs +++ b/OpenRA.Game/Traits/Attack/AttackBase.cs @@ -248,12 +248,11 @@ namespace OpenRA.Traits protected virtual void QueueAttack(Actor self, Order order) { - const int RangeTolerance = 1; /* how far inside our maximum range we should try to sit */ /* todo: choose the appropriate weapon, when only one works against this target */ var weapon = self.GetPrimaryWeapon() ?? self.GetSecondaryWeapon(); self.QueueActivity(new Activities.Attack(order.TargetActor, - Math.Max(0, (int)weapon.Range - RangeTolerance))); + Math.Max(0, (int)weapon.Range))); } } }