From d3ab8dbd014997687bd8be818d0f91c9a3b1a524 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Tue, 1 Mar 2016 20:50:35 +0100 Subject: [PATCH] Add facing support to Smoke effect --- OpenRA.Mods.Common/Effects/Smoke.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Effects/Smoke.cs b/OpenRA.Mods.Common/Effects/Smoke.cs index 7c3b11bc00..3a64d4369a 100644 --- a/OpenRA.Mods.Common/Effects/Smoke.cs +++ b/OpenRA.Mods.Common/Effects/Smoke.cs @@ -9,6 +9,7 @@ */ #endregion +using System; using System.Collections.Generic; using OpenRA.Effects; using OpenRA.Graphics; @@ -23,12 +24,15 @@ namespace OpenRA.Mods.Common.Effects readonly string palette; public Smoke(World world, WPos pos, string trail, string palette, string sequence) + : this(world, pos, () => 0, trail, palette, sequence) { } + + public Smoke(World world, WPos pos, Func facingFunc, string trail, string palette, string sequence) { this.world = world; this.pos = pos; this.palette = palette; - anim = new Animation(world, trail); + anim = new Animation(world, trail, facingFunc); anim.PlayThen(sequence, () => world.AddFrameEndTask(w => w.Remove(this))); }