Skip to content

Commit

Permalink
Use float for mutation_bar formatting string
Browse files Browse the repository at this point in the history
Turns out giving int on %f in arm64 linux gives huge number
  • Loading branch information
IonAgorria committed May 4, 2024
1 parent f2f6f46 commit b0531de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Source/UserInterface/PerimeterShellUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5854,8 +5854,8 @@ void FormatProgressText(std::string& cb, void* param)
{
terUnitSquad* pSquad = safe_cast<terUnitSquad*>((terUnitBase*)param);
int elements = pSquad->squadMutationMolecula().elementCount(DAMAGE_FILTER_BASE);
int energy = static_cast<int>(xm::round(pSquad->mutationEnergy() * 100));
energy = std::max(0, energy);
float energy = pSquad->mutationEnergy() * 100.0f;
energy = clamp(energy, 0.0f, 100.0f);
std::string text = qdTextDB::instance().getText("Interface.Tips.Mutation_bar");
std::vector<size_t> newlines;

Expand Down

0 comments on commit b0531de

Please sign in to comment.