Chrono tanya fix and CHANGELOG entry for it

This commit is contained in:
Temeez
2014-02-15 13:44:08 +02:00
parent e4e6af6536
commit 5b7db7ed68
2 changed files with 9 additions and 7 deletions

View File

@@ -39,14 +39,15 @@ namespace OpenRA.Mods.RA.Activities
if (killCargo && self.HasTrait<Cargo>())
{
var cargo = self.Trait<Cargo>();
while (!cargo.IsEmpty(self))
if (chronosphere != null)
{
if (chronosphere != null && chronosphere.HasTrait<UpdatesPlayerStatistics>())
chronosphere.Owner.PlayerActor.Trait<PlayerStatistics>().UnitsKilled++;
var a = cargo.Unload(self);
if (a.HasTrait<UpdatesPlayerStatistics>())
a.Owner.PlayerActor.Trait<PlayerStatistics>().UnitsDead++;
while (!cargo.IsEmpty(self))
{
var a = cargo.Unload(self);
// Kill all the units that are unloaded into the void
// Kill() handles kill and death statistics
a.Kill(chronosphere);
}
}
}