diff --git a/OpenRA.Mods.Cnc/Traits/Render/WithEmbeddedTurretSpriteBody.cs b/OpenRA.Mods.Cnc/Traits/Render/WithEmbeddedTurretSpriteBody.cs index 92fcf031cb..58bc47a1d7 100644 --- a/OpenRA.Mods.Cnc/Traits/Render/WithEmbeddedTurretSpriteBody.cs +++ b/OpenRA.Mods.Cnc/Traits/Render/WithEmbeddedTurretSpriteBody.cs @@ -58,6 +58,11 @@ namespace OpenRA.Mods.Cnc.Traits.Render : base(init, info, MakeTurretFacingFunc(init.Self)) { turreted = init.Self.TraitsImplementing().FirstOrDefault(); + } + + protected override void TraitEnabled(Actor self) + { + base.TraitEnabled(self); turreted.QuantizedFacings = DefaultAnimation.CurrentSequence.Facings; } diff --git a/OpenRA.Mods.Cnc/Traits/Render/WithGunboatBody.cs b/OpenRA.Mods.Cnc/Traits/Render/WithGunboatBody.cs index b1e8cfc46f..1d986f72cf 100644 --- a/OpenRA.Mods.Cnc/Traits/Render/WithGunboatBody.cs +++ b/OpenRA.Mods.Cnc/Traits/Render/WithGunboatBody.cs @@ -62,13 +62,18 @@ namespace OpenRA.Mods.Cnc.Traits.Render var name = rs.GetImage(init.Self); turret = init.Self.TraitsImplementing() .First(t => t.Name == info.Turret); - turret.QuantizedFacings = DefaultAnimation.CurrentSequence.Facings; wake = new Animation(init.World, name); wake.PlayRepeating(info.WakeLeftSequence); rs.Add(new AnimationWithOffset(wake, null, null, -87)); } + protected override void TraitEnabled(Actor self) + { + base.TraitEnabled(self); + turret.QuantizedFacings = DefaultAnimation.CurrentSequence.Facings; + } + void ITick.Tick(Actor self) { if (facing.Facing <= 128) diff --git a/OpenRA.Mods.Common/Traits/Render/WithResourceLevelSpriteBody.cs b/OpenRA.Mods.Common/Traits/Render/WithResourceLevelSpriteBody.cs index 8d92b3b439..92c67c44a3 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithResourceLevelSpriteBody.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithResourceLevelSpriteBody.cs @@ -47,7 +47,6 @@ namespace OpenRA.Mods.Common.Traits.Render { this.info = info; playerResources = init.Self.Owner.PlayerActor.Trait(); - ConfigureAnimation(init.Self); } void ConfigureAnimation(Actor self) @@ -65,7 +64,8 @@ namespace OpenRA.Mods.Common.Traits.Render protected override void TraitEnabled(Actor self) { - // Do nothing - we just want to disable the default WithSpriteBody implementation + base.TraitEnabled(self); + ConfigureAnimation(self); } public override void CancelCustomAnimation(Actor self)