mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 19:13:07 +01:00
Improve #15322: Circus Music Not Playing
Alleviates the issue, though the circus in European Extravaganza still does not work correctly.
This commit is contained in:
@@ -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<Vehicle>(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;
|
||||
|
||||
Reference in New Issue
Block a user