From c2272b9233d220d07a2814b6fbbb46c283429787 Mon Sep 17 00:00:00 2001 From: Michael Date: Sun, 1 Sep 2019 14:51:46 -0400 Subject: [PATCH] Added check for No Money cheat for issue #9957 --- src/openrct2/peep/Guest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 56d59dd9ad2a..a9ace4b6d255 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1551,12 +1551,12 @@ bool Guest::DecideAndBuyItem(Ride* ride, int32_t shopItem, money32 price) { if (price != 0) { - if (cash_in_pocket == 0) + if ((cash_in_pocket == 0) && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { InsertNewThought(PEEP_THOUGHT_TYPE_SPENT_MONEY, PEEP_THOUGHT_ITEM_NONE); return false; } - if (price > cash_in_pocket) + if ((price > cash_in_pocket) && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { InsertNewThought(PEEP_THOUGHT_TYPE_CANT_AFFORD, shopItem); return false; @@ -2052,7 +2052,7 @@ bool Guest::ShouldGoOnRide(Ride* ride, int32_t entranceNum, bool atQueue, bool t } // Basic price checks - if (ridePrice != 0 && !peep_has_voucher_for_free_ride(this, ride)) + if (ridePrice != 0 && !peep_has_voucher_for_free_ride(this, ride) && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { if (ridePrice > cash_in_pocket) { @@ -2641,7 +2641,7 @@ static bool peep_check_ride_price_at_entrance(Guest* peep, Ride* ride, money32 r && peep->voucher_arguments == peep->current_ride) return true; - if (peep->cash_in_pocket <= 0) + if ((peep->cash_in_pocket <= 0) && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { peep->InsertNewThought(PEEP_THOUGHT_TYPE_SPENT_MONEY, PEEP_THOUGHT_ITEM_NONE); peep_update_ride_at_entrance_try_leave(peep);