From 2550f1bee5bb20d95e58599baa90efc8cfcff049 Mon Sep 17 00:00:00 2001 From: Alug Date: Fri, 4 Apr 2025 18:13:12 +0200 Subject: [PATCH] no need to scale the volume for splitscreen if we dont play a sound lol --- src/s_sound.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/s_sound.c b/src/s_sound.c index cc8e3b2a2..fc77fdacf 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -430,7 +430,7 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume) { const mobj_t *origin = (const mobj_t *)origin_p; const boolean reverse = (stereoreverse.value ^ encoremode); - const INT32 initial_volume = (origin ? S_ScaleVolumeWithSplitscreen(volume) : volume); + INT32 initial_volume; sfxinfo_t *sfx; INT32 sep, pitch, priority, cnum; @@ -448,6 +448,8 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume) if (sfx_id == sfx_None) return; + initial_volume = (origin ? S_ScaleVolumeWithSplitscreen(volume) : volume); + for (i = 0; i <= splitscreen; i++) { player_t *player = &players[displayplayers[i]];