diff --git a/OpenRA.Game/Effects/SpriteEffect.cs b/OpenRA.Game/Effects/SpriteEffect.cs index d3a8d00911..557390691e 100644 --- a/OpenRA.Game/Effects/SpriteEffect.cs +++ b/OpenRA.Game/Effects/SpriteEffect.cs @@ -23,14 +23,14 @@ namespace OpenRA.Effects readonly bool visibleThroughFog; readonly bool scaleSizeWithZoom; - public SpriteEffect(WPos pos, World world, string image, string sequence, string palette, bool visibleThroughFog = false, bool scaleSizeWithZoom = false) + public SpriteEffect(WPos pos, World world, string image, string sequence, string palette, int facing = 0, bool visibleThroughFog = false, bool scaleSizeWithZoom = false) { this.world = world; this.pos = pos; this.palette = palette; this.scaleSizeWithZoom = scaleSizeWithZoom; this.visibleThroughFog = visibleThroughFog; - anim = new Animation(world, image); + anim = new Animation(world, image, () => facing); anim.PlayThen(sequence, () => world.AddFrameEndTask(w => w.Remove(this))); } diff --git a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs index 386033902e..24717d2105 100644 --- a/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs +++ b/OpenRA.Game/Widgets/WorldInteractionControllerWidget.cs @@ -199,7 +199,7 @@ namespace OpenRA.Widgets else if (o.TargetLocation != CPos.Zero) { var pos = world.Map.CenterOfCell(cell); - world.AddFrameEndTask(w => w.Add(new SpriteEffect(pos, world, "moveflsh", "idle", "moveflash", true, true))); + world.AddFrameEndTask(w => w.Add(new SpriteEffect(pos, world, "moveflsh", "idle", "moveflash", 0, true, true))); flashed = true; } } diff --git a/OpenRA.Mods.Common/Traits/Render/LeavesTrails.cs b/OpenRA.Mods.Common/Traits/Render/LeavesTrails.cs index 754b92971e..1670c3ade6 100644 --- a/OpenRA.Mods.Common/Traits/Render/LeavesTrails.cs +++ b/OpenRA.Mods.Common/Traits/Render/LeavesTrails.cs @@ -80,7 +80,7 @@ namespace OpenRA.Mods.Common.Traits.Render if (Info.TerrainTypes.Contains(type) && !string.IsNullOrEmpty(Info.Image)) self.World.AddFrameEndTask(w => w.Add(new SpriteEffect(pos, self.World, Info.Image, - Info.Sequences.Random(Game.CosmeticRandom), Info.Palette, Info.VisibleThroughFog))); + Info.Sequences.Random(Game.CosmeticRandom), Info.Palette, 0, Info.VisibleThroughFog))); cachedPosition = self.CenterPosition; ticks = 0;