From 7ac2c66ec00c050ec5cb91ad2834cf316d886b9a Mon Sep 17 00:00:00 2001 From: Mustafa Alperen Seki Date: Wed, 27 Sep 2017 18:06:25 +0300 Subject: [PATCH] Check if ExternalCaptures is disabled while capturing for AI --- OpenRA.Mods.Common/AI/HackyAI.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/AI/HackyAI.cs b/OpenRA.Mods.Common/AI/HackyAI.cs index 74a686cda385..0c828b790703 100644 --- a/OpenRA.Mods.Common/AI/HackyAI.cs +++ b/OpenRA.Mods.Common/AI/HackyAI.cs @@ -900,7 +900,7 @@ void QueueCaptureOrders() // var capturesCapturers = capturers.Where(a => a.Info.HasTraitInfo()); // var externalCapturers = capturers.Except(capturesCapturers).Where(a => a.Info.HasTraitInfo()); - var externalCapturers = capturers.Where(a => a.Info.HasTraitInfo()); + var externalCapturers = capturers.Where(a => a.TraitsImplementing().ToArray().FirstOrDefault(c => !c.IsTraitDisabled) != null); // foreach (var capturer in capturesCapturers) // QueueCaptureOrderFor(capturer, GetCapturerTargetClosestToOrDefault(capturer, capturableTargetOptions));