fix some fail desyncs in chronoshift code

This commit is contained in:
Chris Forbes
2010-05-26 19:02:43 +12:00
parent e7b7f69caf
commit 270941cfde
5 changed files with 8 additions and 13 deletions

View File

@@ -50,10 +50,6 @@ namespace OpenRA.Mods.RA
{
if (self.Owner == self.World.LocalPlayer)
Game.controller.CancelInputMode();
// Cannot chronoshift into unexplored location
if (!self.Owner.Shroud.IsExplored(order.TargetLocation))
return;
// Ensure the target cell is valid for the unit
var movement = order.TargetActor.traits.GetOrDefault<IMovement>();
@@ -147,7 +143,9 @@ namespace OpenRA.Mods.RA
yield break;
}
yield return new Order("ChronosphereActivate", world.LocalPlayer.PlayerActor, self, xy);
// Cannot chronoshift into unexplored location
if (world.LocalPlayer.Shroud.IsExplored(xy))
yield return new Order("ChronosphereActivate", world.LocalPlayer.PlayerActor, self, xy);
}
public void Tick(World world)