fix a rare case where a Petra attack would not know its target is already destroyed

This was SVN commit r15749.
This commit is contained in:
mimo
2014-09-14 13:43:11 +00:00
parent 0f0f4f7b03
commit 4f7a935f44
@@ -1502,6 +1502,8 @@ m.AttackPlan.prototype.update = function(gameState, events)
continue;
if (accessIndex !== gameState.ai.accessibility.getAccessValue(attack.targetPos))
continue;
if (!attack.target || !gameState.getEntityById(attack.target.id()))
continue;
this.target = attack.target;
this.targetPlayer = attack.targetPlayer;
break;