Commit e73e704d authored by Lioncache's avatar Lioncache

CPlayerState: Make GetPickupTotal() a const member function

This doesn't modify internal member state.
parent 9ce7c72a
......@@ -119,7 +119,7 @@ public:
CHealthInfo& GetHealthInfo();
const CHealthInfo& GetHealthInfo() const;
u32 GetPickupTotal() { return 99; }
u32 GetPickupTotal() const { return 99; }
void SetIsFusionEnabled(bool val) { x0_26_fusion = val; }
bool IsFusionEnabled() const { return x0_26_fusion; }
EPlayerSuit GetCurrentSuit() const;
......
......@@ -692,8 +692,8 @@ void CMain::UpdateDiscordPresence(CAssetId worldSTRG) {
}
if (g_GameState != nullptr) {
if (CPlayerState* pState = g_GameState->GetPlayerState().get()) {
u32 itemPercent = pState->CalculateItemCollectionRate() * 100 / pState->GetPickupTotal();
if (const CPlayerState* pState = g_GameState->GetPlayerState().get()) {
const u32 itemPercent = pState->CalculateItemCollectionRate() * 100 / pState->GetPickupTotal();
if (DiscordItemPercent != itemPercent) {
DiscordItemPercent = itemPercent;
DiscordState = fmt::format(FMT_STRING("{}%"), itemPercent);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment