Fix #9957: Guests complain about running out of money in no money parks

This commit is contained in:
gill984 2019-09-22 10:52:53 -04:00 committed by Michael Steenbeek
parent 2e5f46fcf1
commit 565ad3798d
3 changed files with 5 additions and 4 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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);