Merge pull request #10119 from RoosterDragon/sort-effects-with-actors

Interleave renderables for effects and actors
This commit is contained in:
Matthias Mailänder
2015-12-31 12:31:47 +01:00
14 changed files with 153 additions and 76 deletions

View File

@@ -69,6 +69,7 @@ namespace OpenRA.Mods.Common.Effects
public readonly bool TrailUsePlayerPalette = false;
public readonly int ContrailLength = 0;
public readonly int ContrailZOffset = 2047;
public readonly Color ContrailColor = Color.White;
public readonly bool ContrailUsePlayerColor = false;
public readonly int ContrailDelay = 1;
@@ -134,7 +135,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;