fix glitchyness on repairing veteran units

This commit is contained in:
Chris Forbes
2011-05-23 19:48:59 +12:00
parent 0bd4d6d417
commit 0d63e9f999

View File

@@ -81,7 +81,7 @@ namespace OpenRA.Traits
.Concat(self.Owner.PlayerActor.TraitsImplementing<IDamageModifier>())
.Select(t => t.GetDamageModifier(attacker, warhead)).Product();
damage = (int)(damage * modifier);
damage = damage > 0 ? (int)(damage * modifier) : damage;
hp = Exts.Clamp(hp - damage, 0, MaxHP);
var ai = new AttackInfo