forked from 0ad/0ad
fixes petra javascript warnings
This was SVN commit r15543.
This commit is contained in:
parent
a9048fa43d
commit
9d505f2fd1
@ -1404,6 +1404,8 @@ m.AttackPlan.prototype.Abort = function(gameState)
|
||||
{
|
||||
// Do not use QuickIter with forEach when forEach removes elements
|
||||
this.unitCollection.preventQuickIter();
|
||||
if (this.unitCollection.length)
|
||||
{
|
||||
// If the attack was started, and we are on the same land as the rallyPoint, go back there
|
||||
var rallyPoint = this.rallyPoint;
|
||||
var planIndex = gameState.ai.accessibility.getAccessValue(this.position);
|
||||
@ -1419,6 +1421,7 @@ m.AttackPlan.prototype.Abort = function(gameState)
|
||||
}
|
||||
ent.setMetadata(PlayerID, "plan", -1);
|
||||
});
|
||||
}
|
||||
|
||||
for (var unitCat in this.unitStat) {
|
||||
delete this.unitStat[unitCat];
|
||||
|
Loading…
Reference in New Issue
Block a user