1
0
forked from mirrors/0ad

fixes some typos

This was SVN commit r15629.
This commit is contained in:
mimo
2014-08-12 20:45:06 +00:00
parent 0b385384aa
commit abef0673bd
2 changed files with 2 additions and 2 deletions
@@ -77,7 +77,7 @@ m.GarrisonManager.prototype.update = function(gameState, queues)
var ent = gameState.getEntityById(list[j]);
if (this.keepGarrisoned(ent, holder, enemiesAround))
continue;
if (ent.getMetadata(PlayerID, "garrisonHolder") === id)
if (ent.getMetadata(PlayerID, "garrisonHolder") == +id)
this.leaveGarrison(ent);
list.splice(j--, 1);
}
@@ -595,7 +595,7 @@ m.Worker.prototype.startHunting = function(gameState, position)
// some simple accessibility check: if they're in an inaccessible square, we won't gather from them.
// (happen only at start of the game, as animals should not be able to walk to an inaccessible area)
// TODO as the animal can move, check again from time to time
if (supply.setMetadata(PlayerID, "inaccessible") === undefined)
if (supply.getMetadata(PlayerID, "inaccessible") === undefined)
{
var fakeMap = new API3.Map(gameState.sharedScript, gameState.getMap().data);
var mapPos = fakeMap.gamePosToMapPos(supply.position());