Skip to content

Commit

Permalink
[Cleanup] Explicitly cast to float for more precision in Bot::Generat…
Browse files Browse the repository at this point in the history
…eBastHitPoints() (#3238)

# Notes
- Not casting explicitly we lost precision.
  • Loading branch information
Kinglykrab committed Apr 3, 2023
1 parent 6009101 commit 26eabcd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zone/bot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 26eabcd

Please sign in to comment.