Fix #14337: Guest blocking ride entrance (#17743)

If the ride price becomes unaffordable for a guest who is already waiting to enter a vehicle, that guest became stuck due to an animation loop.
This commit is contained in:
Rik Smeets 2022-08-22 22:15:58 +02:00 committed by GitHub
parent 0ff79d58fe
commit 67ea7e739f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -14,6 +14,7 @@
- Change: [#17499] Update error text when using vehicle incompatible with TD6 and add error when using incompatible track elements.
- Change: [#17655] Lower default price for the Crooked House.
- Fix: [#7466] Coaster track not drawn at tunnel exit.
- Fix: [#14337] Guest blocking ride entrance after ride price changed to be unaffordable.
- Fix: [#15328] Wooden Roller Coaster incorrectly draws a railing on the first station piece (original bug).
- Fix: [#16392] Scenery on sloped surface is placed at wrong height.
- Fix: [#16476] The game sometimes crashes when demolishing a maze.

View File

@ -2617,7 +2617,13 @@ static bool peep_check_ride_price_at_entrance(Guest* peep, Ride* ride, money32 r
if (ridePrice > peep->CashInPocket)
{
peep->InsertNewThought(PeepThoughtType::CantAffordRide, peep->CurrentRide);
// Prevent looping of same thought / animation since Destination Tolerance
// is only 0 exactly at entrance and will immediately change as guest
// tries to leave hereafter
if (peep->DestinationTolerance == 0)
{
peep->InsertNewThought(PeepThoughtType::CantAffordRide, peep->CurrentRide);
}
peep_update_ride_at_entrance_try_leave(peep);
return false;
}

View File

@ -42,7 +42,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 "7"
#define NETWORK_STREAM_VERSION "8"
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
static Peep* _pickup_peep = nullptr;