[Cleanup] Explicitly cast to float for more precision in Bot::GenerateBastHitPoints() (#3238)

# Notes
- Not casting explicitly we lost precision.
This commit is contained in:
Alex King 2023-04-03 17:05:48 -04:00 committed by GitHub
parent 60091015d3
commit 26eabcd7a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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<float>(NormalSTA) - 255.0f) / 2.0f);
else
SoDPost255 = 0;
SoDPost255 = 0.0f;
int hp_factor = GetClassHPFactor();