fix (dis)allowing of garrisoning by other components. Refs #2067

This was SVN commit r13697.
This commit is contained in:
sanderd17
2013-08-18 08:23:36 +00:00
parent 92f4391f51
commit 557c1fc067
@@ -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;
};
/**