added tracking of deaths as well as kills
This commit is contained in:
@@ -185,8 +185,9 @@ namespace OpenRA
|
||||
if (Health <= 0)
|
||||
{
|
||||
Health = 0;
|
||||
if (attacker.Owner != null)
|
||||
attacker.Owner.Kills++;
|
||||
|
||||
attacker.Owner.Kills++;
|
||||
Owner.Deaths++;
|
||||
|
||||
if (RemoveOnDeath)
|
||||
World.AddFrameEndTask(w => w.Remove(this));
|
||||
|
||||
@@ -33,6 +33,7 @@ namespace OpenRA
|
||||
{
|
||||
public Actor PlayerActor;
|
||||
public int Kills;
|
||||
public int Deaths;
|
||||
|
||||
public readonly string Palette;
|
||||
public readonly Color Color;
|
||||
|
||||
@@ -64,6 +64,7 @@ namespace OpenRA.Mods.Aftermath
|
||||
// Remove from world
|
||||
self.Health = 0;
|
||||
detonatedBy.Owner.Kills++;
|
||||
self.Owner.Deaths++;
|
||||
w.Remove(self);
|
||||
} );
|
||||
}
|
||||
|
||||
@@ -68,7 +68,8 @@ namespace OpenRA.Mods.RA
|
||||
while (!cargo.IsEmpty(self))
|
||||
{
|
||||
chronosphere.Owner.Kills++;
|
||||
cargo.Unload(self);
|
||||
var a = cargo.Unload(self);
|
||||
a.Owner.Deaths++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user