From 1d404b53a68c48ae088d4d5d0a68a44eea183f8d Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Tue, 14 Oct 2025 22:35:56 +0200 Subject: [PATCH] Replace direct RIDE_TYPE_MOTION_SIMULATOR check with SpecialType --- src/openrct2/entity/Guest.cpp | 4 ++-- src/openrct2/ride/RideData.h | 1 + src/openrct2/ride/rtd/thrill/MotionSimulator.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/openrct2/entity/Guest.cpp b/src/openrct2/entity/Guest.cpp index dc958b6125..635fda3f95 100644 --- a/src/openrct2/entity/Guest.cpp +++ b/src/openrct2/entity/Guest.cpp @@ -4374,7 +4374,7 @@ void Guest::UpdateRideLeaveVehicle() exitWaypointLoc.y += carEntry->peep_loading_waypoints[waypointIndex][2].y; } - if (ride->type == RIDE_TYPE_MOTION_SIMULATOR) + if (ride->getRideTypeDescriptor().specialType == RtdSpecialType::motionSimulator) exitWaypointLoc.z += 15; MoveTo(exitWaypointLoc); @@ -4598,7 +4598,7 @@ void Guest::UpdateRideApproachExitWaypoints() { int16_t actionZ; - if (ride->type == RIDE_TYPE_MOTION_SIMULATOR) + if (ride->getRideTypeDescriptor().specialType == RtdSpecialType::motionSimulator) { actionZ = ride->getStation(CurrentRideStation).GetBaseZ() + 2; diff --git a/src/openrct2/ride/RideData.h b/src/openrct2/ride/RideData.h index 42c098e1d3..f1152ec407 100644 --- a/src/openrct2/ride/RideData.h +++ b/src/openrct2/ride/RideData.h @@ -451,6 +451,7 @@ enum class RtdSpecialType cashMachine, firstAid, enterprise, + motionSimulator, }; // Set on ride types that have a main colour, additional colour and support colour. diff --git a/src/openrct2/ride/rtd/thrill/MotionSimulator.h b/src/openrct2/ride/rtd/thrill/MotionSimulator.h index ebbeacbfb2..a38c942257 100644 --- a/src/openrct2/ride/rtd/thrill/MotionSimulator.h +++ b/src/openrct2/ride/rtd/thrill/MotionSimulator.h @@ -75,6 +75,7 @@ constexpr RideTypeDescriptor MotionSimulatorRTD = .UpdateMeasurementsSpecialElements = RideUpdateMeasurementsSpecialElements_Default, .MusicTrackOffsetLength = RideAudio::RideMusicGetTrackOffsetLength_Default, .UpdateRideApproachVehicleWaypoints = UpdateRideApproachVehicleWaypointsMotionSimulator, + .specialType = RtdSpecialType::motionSimulator, }; } // namespace OpenRCT2 // clang-format on