Skip to content

Commit

Permalink
First reset the player's money, and then give them the expected amount.
Browse files Browse the repository at this point in the history
Apparently the gamemode does not register the money change if only the
amount is being given to the player. This way, Casino kept paying out.
Fixes #250
  • Loading branch information
mblokker committed Aug 22, 2016
1 parent 0ecfed7 commit d1839a1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pawn/Entities/Financial/Anticheat/PlayerMoneyState.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,8 @@ class PlayerMoneyState <playerId (MAX_PLAYERS)> {

// Now re-synchronize the amount of money with the player, based on what we think they
// should be having right now. Reset their money first, then give them the new amount.
GivePlayerMoneyPrivate(playerId, amount);
ResetPlayerMoneyPrivate(playerId);
GivePlayerMoneyPrivate(playerId, m_cash);

// Report this change to the money indicator, so we can give them visual feedback of what
// happened. We won't show the indicator if this is a discrete money change.
Expand Down

0 comments on commit d1839a1

Please sign in to comment.