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 authored and GitHub committed 2022-08-22 21:15:58 +01:00
1 parent 0ff79d58fe
commit 67ea7e739f
3 files changed
+9 -2

No files matched your search

+1
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.
+7 -1
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;
}
+1 -1
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;