From 490d8d5a5f5d380f31afa98ed062204bb81e314a Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Wed, 19 May 2010 19:30:26 +1200 Subject: [PATCH] make autotarget not interested in cloaked units; make ss a normal ship (but cloaked) rather than its own unit type --- OpenRA.Game/Traits/AI/AutoTarget.cs | 1 + mods/ra/vehicles.yaml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Game/Traits/AI/AutoTarget.cs b/OpenRA.Game/Traits/AI/AutoTarget.cs index c8b120ba30..a3b9cd146e 100644 --- a/OpenRA.Game/Traits/AI/AutoTarget.cs +++ b/OpenRA.Game/Traits/AI/AutoTarget.cs @@ -67,6 +67,7 @@ namespace OpenRA.Traits return inRange .Where(a => a.Owner != null && self.Owner.Stances[ a.Owner ] == Stance.Enemy) .Where(a => Combat.HasAnyValidWeapons(self, a)) + .Where(a => !a.traits.Contains() || !a.traits.Get().Cloaked) .OrderBy(a => (a.Location - self.Location).LengthSquared) .FirstOrDefault(); } diff --git a/mods/ra/vehicles.yaml b/mods/ra/vehicles.yaml index 7771e2be1f..944dc78e10 100644 --- a/mods/ra/vehicles.yaml +++ b/mods/ra/vehicles.yaml @@ -390,7 +390,6 @@ SS: Sight: 6 Speed: 6 WaterBound: yes - TargetType: Sub RenderUnit: Cloak: InitialDelay: .4