forked from mirrors/0ad
fix (dis)allowing of garrisoning by other components. Refs #2067
This was SVN commit r13697.
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user