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:
@@ -63,6 +63,7 @@ namespace OpenRA.Mods.Common.Effects
|
|||||||
public readonly bool TrailUsePlayerPalette = false;
|
public readonly bool TrailUsePlayerPalette = false;
|
||||||
|
|
||||||
public readonly int ContrailLength = 0;
|
public readonly int ContrailLength = 0;
|
||||||
|
public readonly int ContrailZOffset = 2047;
|
||||||
public readonly Color ContrailColor = Color.White;
|
public readonly Color ContrailColor = Color.White;
|
||||||
public readonly bool ContrailUsePlayerColor = false;
|
public readonly bool ContrailUsePlayerColor = false;
|
||||||
public readonly int ContrailDelay = 1;
|
public readonly int ContrailDelay = 1;
|
||||||
@@ -128,7 +129,7 @@ namespace OpenRA.Mods.Common.Effects
|
|||||||
if (info.ContrailLength > 0)
|
if (info.ContrailLength > 0)
|
||||||
{
|
{
|
||||||
var color = info.ContrailUsePlayerColor ? ContrailRenderable.ChooseColor(args.SourceActor) : info.ContrailColor;
|
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;
|
trailPalette = info.TrailPalette;
|
||||||
|
|||||||
@@ -105,6 +105,8 @@ namespace OpenRA.Mods.Common.Effects
|
|||||||
|
|
||||||
public readonly int ContrailLength = 0;
|
public readonly int ContrailLength = 0;
|
||||||
|
|
||||||
|
public readonly int ContrailZOffset = 2047;
|
||||||
|
|
||||||
public readonly WDist ContrailWidth = new WDist(64);
|
public readonly WDist ContrailWidth = new WDist(64);
|
||||||
|
|
||||||
public readonly Color ContrailColor = Color.White;
|
public readonly Color ContrailColor = Color.White;
|
||||||
@@ -211,7 +213,7 @@ namespace OpenRA.Mods.Common.Effects
|
|||||||
if (info.ContrailLength > 0)
|
if (info.ContrailLength > 0)
|
||||||
{
|
{
|
||||||
var color = info.ContrailUsePlayerColor ? ContrailRenderable.ChooseColor(args.SourceActor) : info.ContrailColor;
|
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;
|
trailPalette = info.TrailPalette;
|
||||||
|
|||||||
Reference in New Issue
Block a user