mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Don't add queues when deserializing AttackPlans
When deserializing the queues are already there. It was an error to try to add a queue since sometimes there must not be a queue.
This commit is contained in:
parent
cca2cfe05c
commit
130ea06ce8
1 changed files with 7 additions and 4 deletions
|
|
@ -219,10 +219,13 @@ export function AttackPlan(gameState, config, uniqueID, type = AttackPlan.TYPE_D
|
|||
this.unitStat[cat].minSize = Math.ceil(this.Config.popScaling * this.unitStat[cat].minSize);
|
||||
}
|
||||
|
||||
// TODO: there should probably be one queue per type of training building
|
||||
gameState.ai.queueManager.addQueue("plan_" + this.name, priority);
|
||||
gameState.ai.queueManager.addQueue("plan_" + this.name +"_champ", priority+1);
|
||||
gameState.ai.queueManager.addQueue("plan_" + this.name +"_siege", priority);
|
||||
if (!deserialized)
|
||||
{
|
||||
// TODO: there should probably be one queue per type of training building
|
||||
gameState.ai.queueManager.addQueue("plan_" + this.name, priority);
|
||||
gameState.ai.queueManager.addQueue("plan_" + this.name +"_champ", priority+1);
|
||||
gameState.ai.queueManager.addQueue("plan_" + this.name +"_siege", priority);
|
||||
}
|
||||
|
||||
// each array is [ratio, [associated classes], associated EntityColl, associated unitStat, name ]
|
||||
this.buildOrders = [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue