petra: fix bug in garrisoning following capture adaptation

This was SVN commit r16639.
This commit is contained in:
mimo 2015-05-08 18:48:51 +00:00
parent c8e964f0e9
commit 1155bf589b

View File

@ -20,7 +20,7 @@ m.GarrisonManager.prototype.update = function(gameState, queues)
for (let [id, list] of this.holders.entries()) for (let [id, list] of this.holders.entries())
{ {
let holder = gameState.getEntityById(id); let holder = gameState.getEntityById(id);
if (!holder || holder.owner() !== PlayerID) if (!holder || !gameState.isPlayerAlly(holder.owner()))
{ {
// this holder was certainly destroyed or captured. Let's remove it // this holder was certainly destroyed or captured. Let's remove it
for (let entId of list) for (let entId of list)