Move SpriteEffect facing parameter to the end
To avoid potential incompatibilities with downstream projects.
This commit is contained in:
@@ -23,7 +23,7 @@ namespace OpenRA.Effects
|
||||
readonly bool visibleThroughFog;
|
||||
readonly bool scaleSizeWithZoom;
|
||||
|
||||
public SpriteEffect(WPos pos, World world, string image, string sequence, string palette, int facing = 0, bool visibleThroughFog = false, bool scaleSizeWithZoom = false)
|
||||
public SpriteEffect(WPos pos, World world, string image, string sequence, string palette, bool visibleThroughFog = false, bool scaleSizeWithZoom = false, int facing = 0)
|
||||
{
|
||||
this.world = world;
|
||||
this.pos = pos;
|
||||
|
||||
@@ -199,7 +199,7 @@ namespace OpenRA.Widgets
|
||||
else if (o.TargetLocation != CPos.Zero)
|
||||
{
|
||||
var pos = world.Map.CenterOfCell(cell);
|
||||
world.AddFrameEndTask(w => w.Add(new SpriteEffect(pos, world, "moveflsh", "idle", "moveflash", 0, true, true)));
|
||||
world.AddFrameEndTask(w => w.Add(new SpriteEffect(pos, world, "moveflsh", "idle", "moveflash", true, true)));
|
||||
flashed = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ namespace OpenRA.Mods.Common.Traits.Render
|
||||
|
||||
if (Info.TerrainTypes.Contains(type) && !string.IsNullOrEmpty(Info.Image))
|
||||
self.World.AddFrameEndTask(w => w.Add(new SpriteEffect(pos, self.World, Info.Image,
|
||||
Info.Sequences.Random(Game.CosmeticRandom), Info.Palette, spawnFacing, Info.VisibleThroughFog)));
|
||||
Info.Sequences.Random(Game.CosmeticRandom), Info.Palette, Info.VisibleThroughFog, false, spawnFacing)));
|
||||
|
||||
cachedPosition = self.CenterPosition;
|
||||
cachedFacing = facing != null ? facing.Facing : 0;
|
||||
|
||||
Reference in New Issue
Block a user