Convert the float health percentage to an int one
This commit is contained in:
@@ -70,10 +70,7 @@ namespace OpenRA.Mods.Common.Activities
|
||||
var health = self.TraitOrDefault<Health>();
|
||||
if (health != null)
|
||||
{
|
||||
var newHP = (ForceHealthPercentage > 0)
|
||||
? ForceHealthPercentage / 100f
|
||||
: (float)health.HP / health.MaxHP;
|
||||
|
||||
var newHP = (ForceHealthPercentage > 0) ? ForceHealthPercentage : (health.HP * 100) / health.MaxHP;
|
||||
init.Add(new HealthInit(newHP));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user