Fix RCS1068

This commit is contained in:
RoosterDragon
2023-03-18 12:19:22 +00:00
committed by Gustas
parent 1a299d10ed
commit 4fe2ed3df0
3 changed files with 6 additions and 3 deletions

View File

@@ -149,7 +149,7 @@ namespace OpenRA.Mods.Common.Traits
foreach (var minelayer in minelayers)
{
var cells = pathFinder.FindPathToTargetCell(minelayer.Actor, new[] { minelayer.Actor.Location }, enemy.Location, BlockedByActor.Immovable, laneBias: false);
if (cells != null && !(cells.Count == 0))
if (cells != null && cells.Count != 0)
{
AIUtils.BotDebug($"{player}: try find a location to lay mine.");
EnqueueConflictPosition(cells[cells.Count / 2]);
@@ -193,7 +193,7 @@ namespace OpenRA.Mods.Common.Traits
foreach (var minelayer in minelayers)
{
var cells = pathFinder.FindPathToTargetCell(minelayer.Actor, new[] { minelayer.Actor.Location }, minelayingPosition, BlockedByActor.Immovable, laneBias: false);
if (cells != null && !(cells.Count == 0))
if (cells != null && cells.Count != 0)
{
orderedActors.Add(minelayer.Actor);