diff --git a/OpenRA.Game/Traits/Health.cs b/OpenRA.Game/Traits/Health.cs index 1f5283af8a..9de4c74dda 100755 --- a/OpenRA.Game/Traits/Health.cs +++ b/OpenRA.Game/Traits/Health.cs @@ -96,7 +96,9 @@ namespace OpenRA.Traits DamageState = this.DamageState, PreviousDamageState = oldState, DamageStateChanged = this.DamageState != oldState, - Warhead = warhead + Warhead = warhead, + PreviousHealth = hp + damage < 0 ? 0 : hp + damage, + Health = hp }); if (hp <= 0) diff --git a/OpenRA.Game/Traits/TraitsInterfaces.cs b/OpenRA.Game/Traits/TraitsInterfaces.cs index e27bf4f877..a400bc47f4 100755 --- a/OpenRA.Game/Traits/TraitsInterfaces.cs +++ b/OpenRA.Game/Traits/TraitsInterfaces.cs @@ -29,7 +29,9 @@ namespace OpenRA.Traits public int Damage; public DamageState DamageState; public DamageState PreviousDamageState; - public bool DamageStateChanged; + public bool DamageStateChanged; + public int PreviousHealth; + public int Health; } public interface ITick { void Tick(Actor self); }