UnitAI fix by FalseVision

This was SVN commit r15367.
This commit is contained in:
sanderd17 2014-06-15 14:23:49 +00:00
parent ef7e19c13e
commit 1e38fa7b58

View File

@ -4206,7 +4206,7 @@ UnitAI.prototype.MoveToTargetAttackRange = function(target, type)
{
var cmpFormationAttack = Engine.QueryInterface(this.formationController, IID_Attack);
var cmpFormationUnitAI = Engine.QueryInterface(this.formationController, IID_UnitAI);
if (cmpFormationAttack && cmpFormationAttack.CanAttackAsFormation() && cmpFormationUnitAI && cmpFormationUnitAI.GetCurrentState == "FORMATIONCONTROLLER.ATTACKING")
if (cmpFormationAttack && cmpFormationAttack.CanAttackAsFormation() && cmpFormationUnitAI && cmpFormationUnitAI.GetCurrentState() == "FORMATIONCONTROLLER.ATTACKING")
return false;
}