better fix for chrono bug

This commit is contained in:
Chris Forbes
2011-01-08 17:30:29 +13:00
parent 07abeffc5e
commit e2ff40dc7f
3 changed files with 15 additions and 17 deletions

View File

@@ -40,14 +40,14 @@ namespace OpenRA.Mods.RA
}
}
// Can't be used in synced code
public virtual bool CanChronoshiftTo(Actor self, int2 targetLocation)
{
// Todo: Allow enemy units to be chronoshifted into bad terrain to kill them
return self.HasTrait<ITeleportable>() &&
self.Trait<ITeleportable>().CanEnterCell(targetLocation) &&
(self.World.LocalShroud.IsExplored(targetLocation));
}
// Can't be used in synced code, except with ignoreVis.
public virtual bool CanChronoshiftTo(Actor self, int2 targetLocation, bool ignoreVis)
{
// Todo: Allow enemy units to be chronoshifted into bad terrain to kill them
return self.HasTrait<ITeleportable>() &&
self.Trait<ITeleportable>().CanEnterCell(targetLocation) &&
(ignoreVis || self.World.LocalShroud.IsExplored(targetLocation));
}
public virtual bool Teleport(Actor self, int2 targetLocation, int duration, bool killCargo, Actor chronosphere)
{