Add formation check

This was SVN commit r14726.
This commit is contained in:
sanderd17 2014-02-02 09:15:34 +00:00
parent 4be80f9322
commit 9971e3cfab

View File

@ -1752,7 +1752,8 @@ var UnitFsmSpec = {
if (this.IsFormationMember())
{
var cmpFormation = Engine.QueryInterface(this.formationController, IID_Formation);
animationName = cmpFormation.GetFormationAnimation(this.entity, animationName);
if (cmpFormation)
animationName = cmpFormation.GetFormationAnimation(this.entity, animationName);
}
this.SelectAnimation(animationName, false, 1.0, "attack");
this.SetAnimationSync(prepare, this.attackTimers.repeat);