diff --git a/OpenRA.Mods.RA/Render/RenderInfantry.cs b/OpenRA.Mods.RA/Render/RenderInfantry.cs index c81e2f4ee6..b0e62d8b7a 100644 --- a/OpenRA.Mods.RA/Render/RenderInfantry.cs +++ b/OpenRA.Mods.RA/Render/RenderInfantry.cs @@ -20,6 +20,7 @@ namespace OpenRA.Mods.RA.Render public readonly int MinIdleWaitTicks = 30; public readonly int MaxIdleWaitTicks = 110; public readonly string[] IdleAnimations = { }; + public readonly string[] StandAnimations = { "stand" }; public override object Create(ActorInitializer init) { return new RenderInfantry(init.self, this); } } @@ -58,7 +59,7 @@ namespace OpenRA.Mods.RA.Render : base(self, MakeFacingFunc(self)) { this.info = info; - anim.PlayFetchIndex(NormalizeInfantrySequence(self, "stand"), () => 0); + anim.PlayFetchIndex(NormalizeInfantrySequence(self, info.StandAnimations.Random(Game.CosmeticRandom)), () => 0); State = AnimationState.Waiting; mobile = self.Trait(); @@ -86,7 +87,7 @@ namespace OpenRA.Mods.RA.Render if ((State == AnimationState.Moving || dirty) && !mobile.IsMoving) { State = AnimationState.Waiting; - anim.PlayFetchIndex(NormalizeInfantrySequence(self, "stand"), () => 0); + anim.PlayFetchIndex(NormalizeInfantrySequence(self, info.StandAnimations.Random(Game.CosmeticRandom)), () => 0); } else if ((State != AnimationState.Moving || dirty) && mobile.IsMoving) { @@ -101,7 +102,7 @@ namespace OpenRA.Mods.RA.Render { if (State != AnimationState.Idle && State != AnimationState.IdleAnimating) { - anim.PlayFetchIndex(NormalizeInfantrySequence(self, "stand"), () => 0); + anim.PlayFetchIndex(NormalizeInfantrySequence(self, info.StandAnimations.Random(Game.CosmeticRandom)), () => 0); State = AnimationState.Idle; if (info.IdleAnimations.Length > 0) @@ -117,7 +118,7 @@ namespace OpenRA.Mods.RA.Render State = AnimationState.IdleAnimating; anim.PlayThen(idleSequence, () => { - anim.PlayRepeating(NormalizeInfantrySequence(self, "stand")); + anim.PlayRepeating(NormalizeInfantrySequence(self, info.StandAnimations.Random(Game.CosmeticRandom))); State = AnimationState.Waiting; }); } diff --git a/OpenRA.Mods.RA/Render/RenderSpy.cs b/OpenRA.Mods.RA/Render/RenderSpy.cs index 966401cd68..87be22b060 100755 --- a/OpenRA.Mods.RA/Render/RenderSpy.cs +++ b/OpenRA.Mods.RA/Render/RenderSpy.cs @@ -46,9 +46,9 @@ namespace OpenRA.Mods.RA.Render { disguisedAsSprite = spy.disguisedAsSprite; if (disguisedAsSprite != null) - anim.ChangeImage(disguisedAsSprite, "stand"); + anim.ChangeImage(disguisedAsSprite, info.StandAnimations.Random(Game.CosmeticRandom)); else - anim.ChangeImage(GetImage(self), "stand"); + anim.ChangeImage(GetImage(self), info.StandAnimations.Random(Game.CosmeticRandom)); UpdatePalette(); } base.Tick(self);