Feature: Hotkey to honk a vehicle's horn (#10110)

This commit is contained in:
Artin Alavi
2022-11-10 12:36:18 -08:00
committed by GitHub
parent 27e1d057c5
commit fd4f148c62
10 changed files with 60 additions and 42 deletions

View File

@@ -235,6 +235,7 @@ void SndCopyToPool()
/**
* Decide 'where' (between left and right speaker) to play the sound effect.
* Note: Callers must determine if sound effects are enabled. This plays a sound regardless of the setting.
* @param sound Sound effect to play
* @param left Left edge of virtual coordinates where the sound is produced
* @param right Right edge of virtual coordinates where the sound is produced
@@ -243,8 +244,6 @@ void SndCopyToPool()
*/
static void SndPlayScreenCoordFx(SoundID sound, int left, int right, int top, int bottom)
{
if (_settings_client.music.effect_vol == 0) return;
/* Iterate from back, so that main viewport is checked first */
for (const Window *w : Window::IterateFromBack()) {
const Viewport *vp = w->viewport;