From 2c5998e5d231308bf2bd15838ab5b69f38929536 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Sun, 27 Dec 2015 20:55:07 +0100 Subject: [PATCH] Make actor Contrail ZOffset customizable --- OpenRA.Mods.Common/Effects/Contrail.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Effects/Contrail.cs b/OpenRA.Mods.Common/Effects/Contrail.cs index 10e7a9dcd7..f0774090ba 100644 --- a/OpenRA.Mods.Common/Effects/Contrail.cs +++ b/OpenRA.Mods.Common/Effects/Contrail.cs @@ -23,6 +23,9 @@ namespace OpenRA.Mods.Common.Effects [Desc("Position relative to body")] public readonly WVec Offset = WVec.Zero; + [Desc("Offset for Z sorting.")] + public readonly int ZOffset = 0; + [Desc("Length of the trail (in ticks).")] public readonly int TrailLength = 25; @@ -51,7 +54,7 @@ namespace OpenRA.Mods.Common.Effects this.info = info; var color = info.UsePlayerColor ? ContrailRenderable.ChooseColor(self) : info.Color; - trail = new ContrailRenderable(self.World, color, info.TrailWidth, info.TrailLength, 0, 0); + trail = new ContrailRenderable(self.World, color, info.TrailWidth, info.TrailLength, 0, info.ZOffset); body = self.Trait(); }