Make actor Contrail ZOffset customizable
This commit is contained in:
@@ -23,6 +23,9 @@ namespace OpenRA.Mods.Common.Effects
|
|||||||
[Desc("Position relative to body")]
|
[Desc("Position relative to body")]
|
||||||
public readonly WVec Offset = WVec.Zero;
|
public readonly WVec Offset = WVec.Zero;
|
||||||
|
|
||||||
|
[Desc("Offset for Z sorting.")]
|
||||||
|
public readonly int ZOffset = 0;
|
||||||
|
|
||||||
[Desc("Length of the trail (in ticks).")]
|
[Desc("Length of the trail (in ticks).")]
|
||||||
public readonly int TrailLength = 25;
|
public readonly int TrailLength = 25;
|
||||||
|
|
||||||
@@ -51,7 +54,7 @@ namespace OpenRA.Mods.Common.Effects
|
|||||||
this.info = info;
|
this.info = info;
|
||||||
|
|
||||||
var color = info.UsePlayerColor ? ContrailRenderable.ChooseColor(self) : info.Color;
|
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<BodyOrientation>();
|
body = self.Trait<BodyOrientation>();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user