1
0
forked from 0ad/0ad

fix units ejecting on destroying structure

This was SVN commit r13887.
This commit is contained in:
sanderd17 2013-09-21 19:41:13 +00:00
parent 4f6ddfe894
commit 5afb18dda4

View File

@ -464,7 +464,7 @@ GarrisonHolder.prototype.OnGlobalOwnershipChanged = function(msg)
var entities = [];
for each (var entity in this.entities)
{
if (!IsOwnedByMutualAllyOfEntity(this.entity, entity))
if (msg.to == -1 || !IsOwnedByMutualAllyOfEntity(this.entity, entity))
entities.push(entity);
}
this.EjectOrKill(entities);