Don't count actors owned by noncombatant players to kills statistic
This commit is contained in:
committed by
Matthias Mailänder
parent
c0da9f1eab
commit
311b6fcd83
@@ -233,16 +233,21 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
var attackerStats = e.Attacker.Owner.PlayerActor.Trait<PlayerStatistics>();
|
var attackerStats = e.Attacker.Owner.PlayerActor.Trait<PlayerStatistics>();
|
||||||
if (self.Info.HasTraitInfo<BuildingInfo>())
|
if (self.Info.HasTraitInfo<BuildingInfo>())
|
||||||
{
|
{
|
||||||
attackerStats.BuildingsKilled++;
|
if (!self.Owner.NonCombatant)
|
||||||
|
attackerStats.BuildingsKilled++;
|
||||||
|
|
||||||
playerStats.BuildingsDead++;
|
playerStats.BuildingsDead++;
|
||||||
}
|
}
|
||||||
else if (self.Info.HasTraitInfo<IPositionableInfo>())
|
else if (self.Info.HasTraitInfo<IPositionableInfo>())
|
||||||
{
|
{
|
||||||
attackerStats.UnitsKilled++;
|
if (!self.Owner.NonCombatant)
|
||||||
|
attackerStats.UnitsKilled++;
|
||||||
|
|
||||||
playerStats.UnitsDead++;
|
playerStats.UnitsDead++;
|
||||||
}
|
}
|
||||||
|
|
||||||
attackerStats.KillsCost += cost;
|
if (!self.Owner.NonCombatant)
|
||||||
|
attackerStats.KillsCost += cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
void INotifyCreated.Created(Actor self)
|
void INotifyCreated.Created(Actor self)
|
||||||
|
|||||||
Reference in New Issue
Block a user