diff --git a/OpenRA.Mods.RA/ChronoshiftDeploy.cs b/OpenRA.Mods.RA/ChronoshiftDeploy.cs index 4bd6a40e45..a5393e7f90 100644 --- a/OpenRA.Mods.RA/ChronoshiftDeploy.cs +++ b/OpenRA.Mods.RA/ChronoshiftDeploy.cs @@ -60,7 +60,7 @@ namespace OpenRA.Mods.RA { if (order.OrderString == "ChronoshiftJump") { - if (CanJumpTo(order.TargetLocation)) + if (CanJumpTo(order.TargetLocation, true)) { self.CancelActivity(); self.QueueActivity(new Teleport(null, order.TargetLocation, true)); @@ -90,14 +90,14 @@ namespace OpenRA.Mods.RA } } - public bool CanJumpTo(CPos xy) + public bool CanJumpTo(CPos xy, bool ignoreVis) { var movement = self.TraitOrDefault(); if (chargeTick <= 0 // Can jump - && self.World.LocalShroud.IsExplored(xy) // Not in shroud + && (self.Location - xy).Length <= Info.JumpDistance // Within jump range && movement.CanEnterCell(xy) // Can enter cell - && (self.Location - xy).Length <= Info.JumpDistance) // Within jump range + && (ignoreVis || self.World.LocalShroud.IsExplored(xy))) // Not in shroud return true; else return false; @@ -121,7 +121,7 @@ namespace OpenRA.Mods.RA var queued = mi.Modifiers.HasModifier(Modifiers.Shift); var cinfo = self.Trait(); - if (cinfo.CanJumpTo(xy)) + if (cinfo.CanJumpTo(xy, false)) { self.World.CancelInputMode(); yield return new Order("ChronoshiftJump", self, queued) { TargetLocation = xy }; @@ -131,7 +131,7 @@ namespace OpenRA.Mods.RA public string GetCursor(World world, CPos xy, MouseInput mi) { var cinfo = self.Trait(); - if (cinfo.CanJumpTo(xy)) + if (cinfo.CanJumpTo(xy, false)) return "chrono-target"; else return "move-blocked";