From 557c1fc0676ac7c9d67fcc534de3afebfdddcf7c Mon Sep 17 00:00:00 2001 From: sanderd17 Date: Sun, 18 Aug 2013 08:23:36 +0000 Subject: [PATCH] fix (dis)allowing of garrisoning by other components. Refs #2067 This was SVN commit r13697. --- .../mods/public/simulation/components/GarrisonHolder.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/binaries/data/mods/public/simulation/components/GarrisonHolder.js b/binaries/data/mods/public/simulation/components/GarrisonHolder.js index 1a50e49a0b..29e7f3b908 100644 --- a/binaries/data/mods/public/simulation/components/GarrisonHolder.js +++ b/binaries/data/mods/public/simulation/components/GarrisonHolder.js @@ -32,7 +32,7 @@ GarrisonHolder.prototype.Init = function() this.entities = []; this.spaceOccupied = 0; this.timer = undefined; - this.allowGarrisoning = []; + this.allowGarrisoning = {}; }; /** @@ -106,7 +106,12 @@ GarrisonHolder.prototype.AllowGarrisoning = function(allow, callerID) */ GarrisonHolder.prototype.IsGarrisoningAllowed = function() { - return this.allowGarrisoning.every(function (x) x); + for each (var allow in this.allowGarrisoning) + { + if (!allow) + return false; + } + return true; }; /**