From 8f8e8710a05d1e29a45ebe32cc84ccc402e2ff36 Mon Sep 17 00:00:00 2001 From: Freagarach Date: Fri, 24 Feb 2023 09:08:38 +0000 Subject: [PATCH] Fix units idling after unable to garrison while there are rally points. When unable to garrison and that is the first rally point, the rest of the rally point queue is not handled. The check was introduced in df1d5d2260 because UnitAI didn't guard garrisoning properly. Patch by: @Langbart Differential revision: https://code.wildfiregames.com/D4954 Fixes #6746 This was SVN commit r27560. --- binaries/data/mods/public/simulation/components/Trainer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binaries/data/mods/public/simulation/components/Trainer.js b/binaries/data/mods/public/simulation/components/Trainer.js index 24ea28f478..16f4c0f61c 100644 --- a/binaries/data/mods/public/simulation/components/Trainer.js +++ b/binaries/data/mods/public/simulation/components/Trainer.js @@ -293,7 +293,7 @@ Trainer.prototype.Item.prototype.Spawn = function() createdEnts.push(ent); } - if (spawnedEnts.length && !autoGarrison && cmpRallyPoint) + if (spawnedEnts.length && cmpRallyPoint) for (const com of GetRallyPointCommands(cmpRallyPoint, spawnedEnts)) ProcessCommand(this.player, com);