Add an upgrade rule

This commit is contained in:
abcdefg30
2015-04-30 17:54:19 +02:00
parent 8d2307db83
commit 95e3713b69
2 changed files with 22 additions and 1 deletions

View File

@@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Activities
var health = self.TraitOrDefault<Health>();
if (health != null)
{
var newHP = (ForceHealthPercentage > 0) ? ForceHealthPercentage : (health.HP * 100) / health.MaxHP;
var newHP = ForceHealthPercentage > 0 ? ForceHealthPercentage : (health.HP * 100) / health.MaxHP;
init.Add(new HealthInit(newHP));
}