Added 'Health' and 'PreviousHealth' to the AttackInfo (so we can know how many 'real' damage is done!)
This commit is contained in:
@@ -96,7 +96,9 @@ namespace OpenRA.Traits
|
|||||||
DamageState = this.DamageState,
|
DamageState = this.DamageState,
|
||||||
PreviousDamageState = oldState,
|
PreviousDamageState = oldState,
|
||||||
DamageStateChanged = this.DamageState != oldState,
|
DamageStateChanged = this.DamageState != oldState,
|
||||||
Warhead = warhead
|
Warhead = warhead,
|
||||||
|
PreviousHealth = hp + damage < 0 ? 0 : hp + damage,
|
||||||
|
Health = hp
|
||||||
});
|
});
|
||||||
|
|
||||||
if (hp <= 0)
|
if (hp <= 0)
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ namespace OpenRA.Traits
|
|||||||
public int Damage;
|
public int Damage;
|
||||||
public DamageState DamageState;
|
public DamageState DamageState;
|
||||||
public DamageState PreviousDamageState;
|
public DamageState PreviousDamageState;
|
||||||
public bool DamageStateChanged;
|
public bool DamageStateChanged;
|
||||||
|
public int PreviousHealth;
|
||||||
|
public int Health;
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface ITick { void Tick(Actor self); }
|
public interface ITick { void Tick(Actor self); }
|
||||||
|
|||||||
Reference in New Issue
Block a user