Add Pitch values for steep diagonal drops to checks in UpdateScreamSound

The checks in UpdateScreamSound (rct2: 0x006D796B) forgot about (steep)
diagonal drops. This resulted in riders' screams getting cut-off on
(long) steep diagonal drops once the last car reached the maximum drop
angle, and the screams re-starting as soon as the first car reached the
valley.
This commit is contained in:
zzril 2023-04-02 00:24:37 +02:00 committed by Severin Paul Höfer
parent 1d74d44824
commit d6ffdb0aa1
1 changed files with 8 additions and 0 deletions

View File

@ -5529,6 +5529,10 @@ OpenRCT2::Audio::SoundId Vehicle::UpdateScreamSound()
continue;
if (vehicle2->Pitch <= 15)
return ProduceScreamSound(totalNumPeeps);
// Pitch 52 occurs on steep diagonal backward drops.
// (50 and 51 occur on gentle ones.)
if (vehicle2->Pitch == 52)
return ProduceScreamSound(totalNumPeeps);
}
return OpenRCT2::Audio::SoundId::Null;
}
@ -5547,6 +5551,10 @@ OpenRCT2::Audio::SoundId Vehicle::UpdateScreamSound()
continue;
if (vehicle2->Pitch <= 23)
return ProduceScreamSound(totalNumPeeps);
// Pitch 55 occurs on steep diagonal drops.
// (53 and 54 occur on gentle ones.)
if (vehicle2->Pitch == 55)
return ProduceScreamSound(totalNumPeeps);
}
return OpenRCT2::Audio::SoundId::Null;
}