From 9297aedfcc7cffd15589a0687f2109a118b8c4fe Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 6 May 2010 01:25:48 +1200 Subject: [PATCH] don't explode on taking damage to <50% while selling --- OpenRA.Game/Graphics/Animation.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/OpenRA.Game/Graphics/Animation.cs b/OpenRA.Game/Graphics/Animation.cs index 832a5fc905..da9bb2a120 100644 --- a/OpenRA.Game/Graphics/Animation.cs +++ b/OpenRA.Game/Graphics/Animation.cs @@ -68,6 +68,9 @@ namespace OpenRA.Graphics public void ReplaceAnim(string sequenceName) { + if (!HasSequence(sequenceName)) + return; + CurrentSequence = SequenceProvider.GetSequence(name, sequenceName); frame %= CurrentSequence.Length; }