fix lag when a garrisoned ship is destroyed in the middle of water
This was SVN commit r16636.
This commit is contained in:
parent
d664fadc38
commit
b30e7ca26b
@ -414,7 +414,15 @@ GarrisonHolder.prototype.PerformEject = function(entities, forced)
|
||||
ejectedEntities.push(entity);
|
||||
}
|
||||
else
|
||||
{
|
||||
success = false;
|
||||
// If the garrisonHolder is a sinking ship, stop trying to eject entities when one fail
|
||||
// to avoid using time when no shoreline around
|
||||
var cmpHealth = Engine.QueryInterface(this.entity, IID_Health);
|
||||
var cmpIdentity = Engine.QueryInterface(this.entity, IID_Identity);
|
||||
if ((!cmpHealth || cmpHealth.GetHitpoints() == 0) && cmpIdentity && cmpIdentity.HasClass("Ship"))
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.OrderWalkToRallyPoint(ejectedEntities);
|
||||
|
Loading…
Reference in New Issue
Block a user