1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-28 01:04:50 +01:00

Replace direct RIDE_TYPE_BOAT_HIRE check with SpecialType

This commit is contained in:
Gymnasiast
2025-10-14 23:30:06 +02:00
parent 5c725b4035
commit 3dfc41ec5b
4 changed files with 5 additions and 2 deletions

View File

@@ -1489,9 +1489,10 @@ void Vehicle::TrainReadyToDepart(uint8_t num_peeps_on_train, uint8_t num_used_se
if (!(curRide->lifecycleFlags & RIDE_LIFECYCLE_BROKEN_DOWN))
{
const auto& rtd = curRide->getRideTypeDescriptor();
// Original code did not check if the ride was a boat hire, causing empty boats to leave the platform when closing a
// Boat Hire with passengers on it.
if (curRide->status != RideStatus::closed || (curRide->numRiders != 0 && curRide->type != RIDE_TYPE_BOAT_HIRE))
if (curRide->status != RideStatus::closed || (curRide->numRiders != 0 && rtd.specialType != RtdSpecialType::boatHire))
{
curRide->getStation(current_station).TrainAtStation = RideStation::kNoTrain;
sub_state = 2;