From 2ba515fb37862ca9acad922f141f8377ee33b034 Mon Sep 17 00:00:00 2001 From: seanmajorpayne <4562746+seanmajorpayne@users.noreply.github.com> Date: Sun, 26 Sep 2021 04:21:38 +0900 Subject: [PATCH] Improve #15322: Circus Music Not Playing Alleviates the issue, though the circus in European Extravaganza still does not work correctly. --- src/openrct2/ride/Ride.cpp | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/src/openrct2/ride/Ride.cpp b/src/openrct2/ride/Ride.cpp index 8075bca203..7465c4ff6e 100644 --- a/src/openrct2/ride/Ride.cpp +++ b/src/openrct2/ride/Ride.cpp @@ -1757,22 +1757,25 @@ Staff* ride_get_assigned_mechanic(Ride* ride) */ static void ride_music_update(Ride* ride) { - const auto& rtd = ride->GetRideTypeDescriptor(); - if (!rtd.HasFlag(RIDE_TYPE_FLAG_MUSIC_ON_DEFAULT) && !rtd.HasFlag(RIDE_TYPE_FLAG_ALLOW_MUSIC)) - { - return; - } - - if (ride->status != RideStatus::Open || !(ride->lifecycle_flags & RIDE_LIFECYCLE_MUSIC)) - { - ride->music_tune_id = 255; - return; - } - + // The circus does not have music in the normal sense - its “music” is a sound effect. if (ride->type == RIDE_TYPE_CIRCUS) { Vehicle* vehicle = GetEntity(ride->vehicles[0]); - if (vehicle != nullptr && vehicle->status != Vehicle::Status::DoingCircusShow) + if (vehicle == nullptr || vehicle->status != Vehicle::Status::DoingCircusShow) + { + ride->music_tune_id = 255; + return; + } + } + else + { + const auto& rtd = ride->GetRideTypeDescriptor(); + if (!rtd.HasFlag(RIDE_TYPE_FLAG_MUSIC_ON_DEFAULT) && !rtd.HasFlag(RIDE_TYPE_FLAG_ALLOW_MUSIC)) + { + return; + } + + if (ride->status != RideStatus::Open || !(ride->lifecycle_flags & RIDE_LIFECYCLE_MUSIC)) { ride->music_tune_id = 255; return;