Update unitCollection in attackPlan

This commit is contained in:
phosit 2025-10-14 21:06:41 +02:00
parent 86289a89fd
commit be03605eac
No known key found for this signature in database
GPG key ID: C9430B600671C268

View file

@ -2183,6 +2183,10 @@ AttackPlan.prototype.checkEvents = function(gameState, events)
this.target = undefined;
}
this.unitCollection = gameState.getOwnUnits().filter(
filters.byMetadata(PlayerID, "plan", this.name));
this.unitCollection.registerUpdates();
if (!this.overseas || this.state !== AttackPlan.STATE_UNEXECUTED)
return;
// let's check if an enemy has built a structure at our access