1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-27 00:34:46 +01:00

remove redundant condition

This commit is contained in:
Spacek531
2023-03-05 23:08:50 -08:00
parent 433ef96a36
commit fdeb311ad3

View File

@@ -6184,17 +6184,14 @@ static void block_brakes_open_previous_section(
MapInvalidateElement(location, reinterpret_cast<TileElement*>(trackElement));
auto trackType = trackElement->GetTrackType();
if (ride.IsBlockSectioned())
if (trackType == TrackElemType::EndStation)
{
if (trackType == TrackElemType::EndStation)
{
OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::BlockBrakeClose, location);
}
else if (trackType == TrackElemType::BlockBrakes)
{
OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::BlockBrakeClose, location);
BlockBrakeSetLinkedBrakesClosed(location, *trackElement, false);
}
OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::BlockBrakeClose, location);
}
else if (trackType == TrackElemType::BlockBrakes)
{
OpenRCT2::Audio::Play3D(OpenRCT2::Audio::SoundId::BlockBrakeClose, location);
BlockBrakeSetLinkedBrakesClosed(location, *trackElement, false);
}
}