From 26eabcd7a48b26474d6b2676a61c7f6008e414fb Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Mon, 3 Apr 2023 17:05:48 -0400 Subject: [PATCH] [Cleanup] Explicitly cast to float for more precision in Bot::GenerateBastHitPoints() (#3238) # Notes - Not casting explicitly we lost precision. --- zone/bot.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zone/bot.cpp b/zone/bot.cpp index ae17f40ab..1516228db 100644 --- a/zone/bot.cpp +++ b/zone/bot.cpp @@ -1184,9 +1184,9 @@ int32 Bot::GenerateBaseHitPoints() { if (GetOwner() && GetOwner()->CastToClient() && GetOwner()->CastToClient()->ClientVersion() >= EQ::versions::ClientVersion::SoD && RuleB(Character, SoDClientUseSoDHPManaEnd)) { float SoDPost255; if (((NormalSTA - 255) / 2) > 0) - SoDPost255 = ((NormalSTA - 255) / 2); + SoDPost255 = ((static_cast(NormalSTA) - 255.0f) / 2.0f); else - SoDPost255 = 0; + SoDPost255 = 0.0f; int hp_factor = GetClassHPFactor();