From c6eb72dabe5c29a13101713a3c61918298c197d1 Mon Sep 17 00:00:00 2001 From: killerwife Date: Fri, 3 Jan 2025 17:28:35 +0100 Subject: [PATCH] Stats: Fix hp rounding issue using confirmed ceil --- src/game/Entities/StatSystem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/Entities/StatSystem.cpp b/src/game/Entities/StatSystem.cpp index db20e2b511a..351f63aeba9 100644 --- a/src/game/Entities/StatSystem.cpp +++ b/src/game/Entities/StatSystem.cpp @@ -239,7 +239,7 @@ void Unit::UpdateMaxHealth() value += GetModifierValue(unitMod, TOTAL_VALUE) + GetHealthBonusFromStamina(); value *= GetModifierValue(unitMod, TOTAL_PCT); - SetMaxHealth((uint32)std::max(value, 1.f)); + SetMaxHealth(uint32(std::ceil(std::max(value, 1.f)))); } void Unit::UpdateMaxPower(Powers power)