mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01:00
Replace direct RIDE_TYPE_BOAT_HIRE check with SpecialType
This commit is contained in:
@@ -3218,7 +3218,7 @@ static void RideSetStartFinishPoints(RideId rideIndex, const CoordsXYE& startEle
|
||||
const auto& rtd = ride->getRideTypeDescriptor();
|
||||
if (rtd.specialType == RtdSpecialType::maze)
|
||||
RideSetMazeEntranceExitPoints(*ride);
|
||||
else if (ride->type == RIDE_TYPE_BOAT_HIRE)
|
||||
else if (rtd.specialType == RtdSpecialType::boatHire)
|
||||
RideSetBoatHireReturnPoint(*ride, startElement);
|
||||
|
||||
if (ride->isBlockSectioned() && !(ride->lifecycleFlags & RIDE_LIFECYCLE_ON_TRACK))
|
||||
|
||||
@@ -453,6 +453,7 @@ enum class RtdSpecialType
|
||||
enterprise,
|
||||
motionSimulator,
|
||||
spaceRings,
|
||||
boatHire,
|
||||
};
|
||||
|
||||
// Set on ride types that have a main colour, additional colour and support colour.
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -76,6 +76,7 @@ constexpr RideTypeDescriptor BoatHireRTD =
|
||||
},
|
||||
.UpdateRotating = UpdateRotatingDefault,
|
||||
.LightFXAddLightsMagicVehicle = Drawing::LightFx::AddLightsMagicVehicle_BoatHire,
|
||||
.specialType = RtdSpecialType::boatHire,
|
||||
};
|
||||
} // namespace OpenRCT2
|
||||
// clang-format on
|
||||
|
||||
Reference in New Issue
Block a user