From e962ae271bf53914bff11c9b7fec283827d03368 Mon Sep 17 00:00:00 2001 From: Phillip Stephens Date: Mon, 6 Feb 2017 19:52:04 -0800 Subject: [PATCH] Fix Retro's rounding fail --- Runtime/CGameState.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Runtime/CGameState.cpp b/Runtime/CGameState.cpp index 3a0df08b2..f93f916ba 100644 --- a/Runtime/CGameState.cpp +++ b/Runtime/CGameState.cpp @@ -128,7 +128,8 @@ CGameState::GameFileStateInfo CGameState::LoadGameFileState(const u8* data) if (origMLVL == 0x158EFE17) itemPercent = 0; else - itemPercent = playerState.CalculateItemCollectionRate() * 100 / playerState.GetPickupTotal(); + itemPercent = std::ceil(playerState.CalculateItemCollectionRate() * 100.f / playerState.GetPickupTotal()); + ret.x18_itemPercent = itemPercent; float somePercent;