diff --git a/OpenRA.Mods.Cnc/Traits/SupportPowers/ChronoshiftPower.cs b/OpenRA.Mods.Cnc/Traits/SupportPowers/ChronoshiftPower.cs index 75c78a3f8d..6af7c6f3d7 100644 --- a/OpenRA.Mods.Cnc/Traits/SupportPowers/ChronoshiftPower.cs +++ b/OpenRA.Mods.Cnc/Traits/SupportPowers/ChronoshiftPower.cs @@ -318,8 +318,13 @@ namespace OpenRA.Mods.Cnc.Traits bool IsValidTarget(CPos xy) { + // Don't teleport if there are no units in range (either all moved out of range, or none yet moved into range) + var unitsInRange = power.UnitsInRange(sourceLocation); + if (!unitsInRange.Any()) + return false; + var canTeleport = false; - foreach (var unit in power.UnitsInRange(sourceLocation)) + foreach (var unit in unitsInRange) { var targetCell = unit.Location + (xy - sourceLocation); if (manager.Self.Owner.Shroud.IsExplored(targetCell) && unit.Trait().CanChronoshiftTo(unit, targetCell))