really fix the undeploy-while-damaged crash

This commit is contained in:
Chris Forbes
2010-05-07 23:15:58 +12:00
parent 8ca7909b5d
commit 2bce53b3d8

View File

@@ -71,7 +71,8 @@ namespace OpenRA.Traits
public void PlayCustomAnimBackwards(Actor self, string name, Action a)
{
anim.PlayBackwardsThen(GetPrefix(self) + name,
var hasSequence = anim.HasSequence(GetPrefix(self) + name);
anim.PlayBackwardsThen(hasSequence ? GetPrefix(self) + name : name,
() => { anim.PlayRepeating(GetPrefix(self) + "idle"); a(); });
}