fixed #2289 - missing chrono effects on return

This commit is contained in:
Chris Forbes
2012-07-01 14:21:43 +12:00
parent 0a4669b925
commit 5fee165692
4 changed files with 11 additions and 24 deletions

View File

@@ -20,15 +20,6 @@ namespace OpenRA.Scripting
{
public static void Chronoshift(World world, List<Pair<Actor, CPos>> units, Actor chronosphere, int duration, bool killCargo)
{
if (chronosphere != null)
chronosphere.Trait<RenderBuilding>().PlayCustomAnim(chronosphere, "active");
// Trigger screen desaturate effect
foreach (var a in world.ActorsWithTrait<ChronoshiftPaletteEffect>())
a.Trait.Enable();
Sound.Play("chrono2.aud", units.First().First.CenterLocation);
foreach (var kv in units)
{
var target = kv.First;
@@ -37,8 +28,6 @@ namespace OpenRA.Scripting
if (cs.CanChronoshiftTo(target, targetCell, true))
cs.Teleport(target, targetCell, duration, killCargo,chronosphere);
}
}
}
}