From e741e83fd403b554c18a4ec3674fffb932acf8a2 Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 6 Jul 2013 19:25:34 +1200 Subject: [PATCH] Convert IonCannon to world coords. --- OpenRA.Mods.Cnc/Effects/IonCannon.cs | 6 ++---- mods/cnc/sequences/misc.yaml | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/OpenRA.Mods.Cnc/Effects/IonCannon.cs b/OpenRA.Mods.Cnc/Effects/IonCannon.cs index 697efece23..1fcefdc9b0 100644 --- a/OpenRA.Mods.Cnc/Effects/IonCannon.cs +++ b/OpenRA.Mods.Cnc/Effects/IonCannon.cs @@ -34,12 +34,10 @@ namespace OpenRA.Mods.Cnc.Effects public IEnumerable Render(WorldRenderer wr) { - yield return new SpriteRenderable(anim.Image, - target.CenterLocation.ToFloat2() - new float2(0, 0.5f*anim.Image.size.Y - Game.CellSize), - wr.Palette("effect"), (int)target.CenterLocation.Y); + yield return new SpriteRenderable(anim.Image, target.CenterPosition, 1, wr.Palette("effect"), 1.0f); } - void Finish( World world ) + void Finish(World world) { world.AddFrameEndTask(w => w.Remove(this)); Combat.DoExplosion(firedBy, "IonCannon", target.CenterLocation, 0); diff --git a/mods/cnc/sequences/misc.yaml b/mods/cnc/sequences/misc.yaml index 8556630c36..9f892d6db3 100644 --- a/mods/cnc/sequences/misc.yaml +++ b/mods/cnc/sequences/misc.yaml @@ -223,6 +223,7 @@ ionsfx: idle: Start: 0 Length: * + Offset: 0, -78 bomblet: idle: