Skip to content

Commit

Permalink
Check if ExternalCaptures is disabled while capturing for AI
Browse files Browse the repository at this point in the history
  • Loading branch information
MustaphaTR committed Sep 27, 2017
1 parent 3f15196 commit 7ac2c66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenRA.Mods.Common/AI/HackyAI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -900,7 +900,7 @@ void QueueCaptureOrders()

// var capturesCapturers = capturers.Where(a => a.Info.HasTraitInfo<CapturesInfo>());
// var externalCapturers = capturers.Except(capturesCapturers).Where(a => a.Info.HasTraitInfo<ExternalCapturesInfo>());
var externalCapturers = capturers.Where(a => a.Info.HasTraitInfo<ExternalCapturesInfo>());
var externalCapturers = capturers.Where(a => a.TraitsImplementing<ExternalCaptures>().ToArray().FirstOrDefault(c => !c.IsTraitDisabled) != null);

// foreach (var capturer in capturesCapturers)
// QueueCaptureOrderFor(capturer, GetCapturerTargetClosestToOrDefault(capturer, capturableTargetOptions));
Expand Down

0 comments on commit 7ac2c66

Please sign in to comment.