From fa003ebda3bd4803ab18167f61d7ec2bf06fd1e6 Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Tue, 23 Jan 2024 18:04:41 +0000 Subject: [PATCH] Disable vehicle sounds entirely when running headlessly --- src/newgrf_sound.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/newgrf_sound.cpp b/src/newgrf_sound.cpp index 6ebe74892a..3d7ad50639 100644 --- a/src/newgrf_sound.cpp +++ b/src/newgrf_sound.cpp @@ -186,6 +186,7 @@ SoundID GetNewGRFSoundID(const GRFFile *file, SoundID sound_id) */ bool PlayVehicleSound(const Vehicle *v, VehicleSoundEvent event, bool force) { + if (IsHeadless()) return true; if ((!_settings_client.sound.vehicle || _settings_client.music.effect_vol == 0) && !force) return true; const GRFFile *file = v->GetGRF();