1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 00:34:46 +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

@@ -387,7 +387,8 @@ namespace GameActions
playerIndex != -1, "Unable to find player %u for game action %u", playerId, action->GetType());
NetworkSetPlayerLastAction(playerIndex, action->GetType());
if (result.Cost != 0)
NetworkIncrementPlayerNumCommands(playerIndex);
if (result.Cost > 0)
{
NetworkAddPlayerMoneySpent(playerIndex, result.Cost);
}