From dd080eb882652078e89600e8359707e080499318 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Tue, 10 Apr 2018 00:57:50 +0200 Subject: [PATCH] Fix bridges not being targetable by enter activities --- OpenRA.Game/Actor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Game/Actor.cs b/OpenRA.Game/Actor.cs index 8ac6ec3419..d5ec506a26 100644 --- a/OpenRA.Game/Actor.cs +++ b/OpenRA.Game/Actor.cs @@ -126,7 +126,7 @@ namespace OpenRA // Caching this in a AddFrameEndTask, because trait construction order might cause problems if done directly at creation time. // All actors that can move should have IMove, if not it's pretty safe to assume the actor is immobile and // all targetable positions can be cached if all ITargetablePositions have no conditional requirements. - if (!Info.HasTraitInfo() && targetablePositions.All(tp => tp.AlwaysEnabled)) + if (!Info.HasTraitInfo() && targetablePositions.Any() && targetablePositions.All(tp => tp.AlwaysEnabled)) staticTargetablePositions = targetablePositions.SelectMany(tp => tp.TargetablePositions(this)).ToArray(); });