From 90a4fe7ca1cd26da5d16dc4a72b710a19b42ff13 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Fri, 28 Jul 2017 15:49:16 +0200 Subject: [PATCH] Resume looping default WithSpriteTurret.Sequence after custom anim It doesn't really make sense not to, and the only trait using PlayCustomAnimation previously did this manually anyway. --- OpenRA.Mods.Common/Traits/Render/WithSpriteTurret.cs | 2 +- OpenRA.Mods.Common/Traits/Render/WithTurretedAttackAnimation.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Render/WithSpriteTurret.cs b/OpenRA.Mods.Common/Traits/Render/WithSpriteTurret.cs index c7add06925..054b93638c 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithSpriteTurret.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithSpriteTurret.cs @@ -143,7 +143,7 @@ namespace OpenRA.Mods.Common.Traits.Render { DefaultAnimation.PlayThen(NormalizeSequence(self, name), () => { - DefaultAnimation.Play(NormalizeSequence(self, Info.Sequence)); + CancelCustomAnimation(self); if (after != null) after(); }); diff --git a/OpenRA.Mods.Common/Traits/Render/WithTurretedAttackAnimation.cs b/OpenRA.Mods.Common/Traits/Render/WithTurretedAttackAnimation.cs index f1bcfc5978..a492104d00 100644 --- a/OpenRA.Mods.Common/Traits/Render/WithTurretedAttackAnimation.cs +++ b/OpenRA.Mods.Common/Traits/Render/WithTurretedAttackAnimation.cs @@ -62,7 +62,7 @@ namespace OpenRA.Mods.Common.Traits.Render void PlayAttackAnimation(Actor self) { if (!string.IsNullOrEmpty(info.AttackSequence)) - wst.PlayCustomAnimation(self, info.AttackSequence, () => wst.CancelCustomAnimation(self)); + wst.PlayCustomAnimation(self, info.AttackSequence); } void INotifyAttack.Attacking(Actor self, Target target, Armament a, Barrel barrel)