Don't count suicides into the game score.
This commit is contained in:
committed by
reaperrr
parent
e616cd1bcb
commit
978de64903
@@ -212,6 +212,24 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
if (self.Owner.WinState != WinState.Undefined)
|
if (self.Owner.WinState != WinState.Undefined)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (includedInArmyValue)
|
||||||
|
{
|
||||||
|
playerStats.ArmyValue -= cost;
|
||||||
|
includedInArmyValue = false;
|
||||||
|
playerStats.Units[actorName].Count--;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (includedInAssetsValue)
|
||||||
|
{
|
||||||
|
playerStats.AssetsValue -= cost;
|
||||||
|
includedInAssetsValue = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
playerStats.DeathsCost += cost;
|
||||||
|
|
||||||
|
if (e.Attacker == self)
|
||||||
|
return;
|
||||||
|
|
||||||
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>())
|
||||||
{
|
{
|
||||||
@@ -225,19 +243,6 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
}
|
}
|
||||||
|
|
||||||
attackerStats.KillsCost += cost;
|
attackerStats.KillsCost += cost;
|
||||||
playerStats.DeathsCost += cost;
|
|
||||||
if (includedInArmyValue)
|
|
||||||
{
|
|
||||||
playerStats.ArmyValue -= cost;
|
|
||||||
includedInArmyValue = false;
|
|
||||||
playerStats.Units[actorName].Count--;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (includedInAssetsValue)
|
|
||||||
{
|
|
||||||
playerStats.AssetsValue -= cost;
|
|
||||||
includedInAssetsValue = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void INotifyCreated.Created(Actor self)
|
void INotifyCreated.Created(Actor self)
|
||||||
|
|||||||
Reference in New Issue
Block a user