Fix AutoTarget acquiring targets under fog/shroud

This commit is contained in:
Pavel Penev
2015-10-18 16:43:54 +03:00
parent f68da6ada7
commit 8c7bdae617

View File

@@ -180,7 +180,7 @@ namespace OpenRA.Mods.Common.Traits
&& !target.IsInRange(self.CenterPosition, arm.Weapon.MinRange))), a); && !target.IsInRange(self.CenterPosition, arm.Weapon.MinRange))), a);
}) })
.Where(kv => kv.Key != null) .Where(kv => kv.Key != null && self.Owner.CanViewActor(kv.Value))
.GroupBy(kv => kv.Key, kv => kv.Value) .GroupBy(kv => kv.Key, kv => kv.Value)
.ToDictionary(kv => kv.Key, kv => kv.ClosestTo(self)); .ToDictionary(kv => kv.Key, kv => kv.ClosestTo(self));