From 565ad3798dfacf696f6c7a130f40176bef2fb601 Mon Sep 17 00:00:00 2001 From: gill984 Date: Sun, 22 Sep 2019 10:52:53 -0400 Subject: [PATCH] Fix #9957: Guests complain about running out of money in no money parks --- distribution/changelog.txt | 1 + src/openrct2/network/Network.cpp | 2 +- src/openrct2/peep/Guest.cpp | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/distribution/changelog.txt b/distribution/changelog.txt index 29b5351968..0beacbe8d5 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -20,6 +20,7 @@ - Fix: [#9729] Peeps do not take into account height difference when deciding to pathfind to a ride entrance (original bug). - Fix: [#9902] Doors/Portcullis do not check to make sure doors are open causing double opens. - Fix: [#9926] Africa - Oasis park has wrong peep spawn (original bug). +- Fix: [#9957] When using 'no money' cheat, guests complain of running out of cash. - Improved: [#9466] Add the rain weather effect to the OpenGL renderer. 0.2.3 (2019-07-10) diff --git a/src/openrct2/network/Network.cpp b/src/openrct2/network/Network.cpp index 7b565e2f07..4a3070f5d4 100644 --- a/src/openrct2/network/Network.cpp +++ b/src/openrct2/network/Network.cpp @@ -34,7 +34,7 @@ // This string specifies which version of network stream current build uses. // It is used for making sure only compatible builds get connected, even within // single OpenRCT2 version. -#define NETWORK_STREAM_VERSION "12" +#define NETWORK_STREAM_VERSION "13" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION static Peep* _pickup_peep = nullptr; diff --git a/src/openrct2/peep/Guest.cpp b/src/openrct2/peep/Guest.cpp index 56d59dd9ad..9ada49696b 100644 --- a/src/openrct2/peep/Guest.cpp +++ b/src/openrct2/peep/Guest.cpp @@ -1549,7 +1549,7 @@ bool Guest::DecideAndBuyItem(Ride* ride, int32_t shopItem, money32 price) loc_69B119: if (!hasVoucher) { - if (price != 0) + if (price != 0 && !(gParkFlags & PARK_FLAGS_NO_MONEY)) { if (cash_in_pocket == 0) { @@ -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);