From 05f0fadd16d4eeadc851e7e5216fa60debbd0e98 Mon Sep 17 00:00:00 2001 From: mimo Date: Fri, 29 Dec 2017 14:37:53 +0000 Subject: [PATCH] petra: remove a useless break This was SVN commit r20722. --- .../mods/public/simulation/ai/petra/attackPlan.js | 11 ++++------- .../mods/public/simulation/ai/petra/baseManager.js | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/binaries/data/mods/public/simulation/ai/petra/attackPlan.js b/binaries/data/mods/public/simulation/ai/petra/attackPlan.js index 70da9da68b..aae83e746e 100644 --- a/binaries/data/mods/public/simulation/ai/petra/attackPlan.js +++ b/binaries/data/mods/public/simulation/ai/petra/attackPlan.js @@ -1801,13 +1801,10 @@ m.AttackPlan.prototype.UpdateWalking = function(gameState, events) this.state = "arrived"; return true; } - else // abort plan - { - if (this.Config.debug > 1) - API3.warn("Attack Plan " + this.type + " " + this.name + " has met walls and gives up."); - return false; - } - break; + // abort plan + if (this.Config.debug > 1) + API3.warn("Attack Plan " + this.type + " " + this.name + " has met walls and gives up."); + return false; } //this.unitCollection.move(this.path[0][0], this.path[0][1]); diff --git a/binaries/data/mods/public/simulation/ai/petra/baseManager.js b/binaries/data/mods/public/simulation/ai/petra/baseManager.js index 7cec50dddf..a20c0d5d44 100644 --- a/binaries/data/mods/public/simulation/ai/petra/baseManager.js +++ b/binaries/data/mods/public/simulation/ai/petra/baseManager.js @@ -829,7 +829,7 @@ m.BaseManager.prototype.assignToFoundations = function(gameState, noRepair) for (let target of damagedBuildings.values()) { - // Don't repair if we're still under attack, unless it's a vital (civcentre or wall) building + // Don't repair if we're still under attack, unless it's a vital (civcentre or wall) building // that's being destroyed. if (gameState.ai.HQ.isNearInvadingArmy(target.position())) if (target.healthLevel() > 0.5 ||