From b839204c7f15d0f9d167d2e82cf64d54f68c6ad4 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Thu, 16 Jan 2020 07:31:02 +0100 Subject: [PATCH] Minor WithInfantryBody reorganisation Move PlayStandAnimation to a more suitable position inside the file. --- .../Traits/Render/WithInfantryBody.cs | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs b/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs index 28967beefd..839761dd6b 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs @@ -80,18 +80,6 @@ namespace OpenRA.Mods.Common.Traits.Render move = init.Self.Trait(); } - public void PlayStandAnimation(Actor self) - { - state = AnimationState.Waiting; - - var sequence = DefaultAnimation.GetRandomExistingSequence(Info.StandSequences, Game.CosmeticRandom); - if (sequence != null) - { - var normalized = NormalizeInfantrySequence(self, sequence); - DefaultAnimation.PlayRepeating(normalized); - } - } - protected override void Created(Actor self) { rsm = self.TraitOrDefault(); @@ -115,6 +103,18 @@ namespace OpenRA.Mods.Common.Traits.Render return hasIdleSequence && !IsModifyingSequence; } + public void PlayStandAnimation(Actor self) + { + state = AnimationState.Waiting; + + var sequence = DefaultAnimation.GetRandomExistingSequence(Info.StandSequences, Game.CosmeticRandom); + if (sequence != null) + { + var normalized = NormalizeInfantrySequence(self, sequence); + DefaultAnimation.PlayRepeating(normalized); + } + } + public void Attacking(Actor self, Target target, Armament a) { string sequence;