From 0c41142027d114f09eac5a384a89b32eddcdc70c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Mon, 21 Mar 2016 07:44:45 +0100 Subject: [PATCH] Add animation support to infantry stand sequences. --- OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs b/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs index c55d5f44f6..2d69211653 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithInfantryBody.cs @@ -74,7 +74,10 @@ namespace OpenRA.Mods.Common.Traits { var sequence = DefaultAnimation.GetRandomExistingSequence(Info.StandSequences, Game.CosmeticRandom); if (sequence != null) - DefaultAnimation.PlayFetchIndex(NormalizeInfantrySequence(self, sequence), () => 0); + { + var normalized = NormalizeInfantrySequence(self, sequence); + DefaultAnimation.PlayRepeating(normalized); + } } public void Created(Actor self)