Make Bullet and Missile contrail ZOffset customizable

And give them a high default to avoid contrails "hiding" below large sprites.
This commit is contained in:
reaperrr
2015-12-27 21:12:38 +01:00
committed by RoosterDragon
parent 2c5998e5d2
commit c7b61799dc
2 changed files with 5 additions and 2 deletions

View File

@@ -105,6 +105,8 @@ namespace OpenRA.Mods.Common.Effects
public readonly int ContrailLength = 0;
public readonly int ContrailZOffset = 2047;
public readonly WDist ContrailWidth = new WDist(64);
public readonly Color ContrailColor = Color.White;
@@ -211,7 +213,7 @@ namespace OpenRA.Mods.Common.Effects
if (info.ContrailLength > 0)
{
var color = info.ContrailUsePlayerColor ? ContrailRenderable.ChooseColor(args.SourceActor) : info.ContrailColor;
contrail = new ContrailRenderable(world, color, info.ContrailWidth, info.ContrailLength, info.ContrailDelay, 0);
contrail = new ContrailRenderable(world, color, info.ContrailWidth, info.ContrailLength, info.ContrailDelay, info.ContrailZOffset);
}
trailPalette = info.TrailPalette;