From bb5d53d9f2df5652cdb68ee5ca6170b3ae05b34d Mon Sep 17 00:00:00 2001 From: Charles Machalow Date: Mon, 14 Mar 2022 23:39:13 -0700 Subject: [PATCH] Fix crash where peeps enter through extra ride entrances (#16727) Fix #16170, #16177 --- src/openrct2/entity/Guest.cpp | 7 ++++++- src/openrct2/network/NetworkBase.cpp | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index 0944ef5dc7..f11ed61d7e 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -3645,7 +3645,12 @@ void Guest::UpdateRideAdvanceThroughEntrance() return; } - Guard::Assert(RideSubState == PeepRideSubState::LeaveEntrance, "Peep ridesubstate should be LeaveEntrance"); + if (RideSubState == PeepRideSubState::InEntrance) + { + RideSubState = PeepRideSubState::FreeVehicleCheck; + return; + } + if (ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_NO_VEHICLES)) { const auto& station = ride->GetStation(CurrentRideStation); diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index 5be1d4622d..e634b9260d 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -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 "20" +#define NETWORK_STREAM_VERSION "21" #define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION static Peep* _pickup_peep = nullptr;