From 0b0c3b7170589ad04df62f7d03cfaafbb36a0561 Mon Sep 17 00:00:00 2001 From: reaperrr Date: Tue, 18 Sep 2018 00:29:05 +0200 Subject: [PATCH] Changed an 'if' to 'else' in Health.Tick Since the two 'if's were mutually exclusive, the 2nd 'if' was turned into an 'else' to potentially skip that check if the 1st succeeds. --- OpenRA.Mods.Common/Traits/Health.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/OpenRA.Mods.Common/Traits/Health.cs b/OpenRA.Mods.Common/Traits/Health.cs index a73fd3e176..935a2c1e5e 100644 --- a/OpenRA.Mods.Common/Traits/Health.cs +++ b/OpenRA.Mods.Common/Traits/Health.cs @@ -171,10 +171,9 @@ namespace OpenRA.Mods.Common.Traits void ITick.Tick(Actor self) { - if (hp > DisplayHP) + if (hp >= DisplayHP) DisplayHP = hp; - - if (DisplayHP > hp) + else DisplayHP = (2 * DisplayHP + hp) / 3; } }