mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
fix (dis)allowing of garrisoning by other components. Refs #2067
This was SVN commit r13697.
This commit is contained in:
parent
92f4391f51
commit
557c1fc067
1 changed files with 7 additions and 2 deletions
|
|
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue