1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-02-03 04:05:49 +01:00

Fix #20737: Spent money underflows when getting refunds (#20765)

This commit is contained in:
Hielke Morsink
2023-09-07 08:19:27 +02:00
committed by GitHub
parent cb51d63dc8
commit 37caebdde9
6 changed files with 23 additions and 3 deletions

View File

@@ -36,11 +36,16 @@ void NetworkPlayer::Write(NetworkPacket& packet)
<< CommandsRan;
}
void NetworkPlayer::AddMoneySpent(money64 cost)
void NetworkPlayer::IncrementNumCommands()
{
MoneySpent += cost;
CommandsRan++;
WindowInvalidateByNumber(WindowClass::Player, Id);
}
void NetworkPlayer::AddMoneySpent(money64 cost)
{
MoneySpent += cost;
WindowInvalidateByNumber(WindowClass::Player, Id);
}
#endif