From 933dadd1727e9ed0b84b10daa05be4fbd89a28dd Mon Sep 17 00:00:00 2001 From: Alug Date: Thu, 31 Jul 2025 18:45:22 +0200 Subject: [PATCH] fix passing garbage to mumble outside of levels this just deadass passed the unitialized listener array into mumble --- 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 09e0c02b2..6727a0881 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -634,6 +634,7 @@ void S_StartSound(const void *origin, sfxenum_t sfx_id) break; } } + if (UNLIKELY(maptol & TOL_XMAS)) // Some sounds change for xmas { switch (sfx_id) @@ -699,6 +700,8 @@ void S_UpdateSounds(void) S_SetMIDIMusicVolume (cv_midimusicvolume.value); #endif + memset(listener, 0, sizeof(listener)); + // We're done now, if we're not in a level. if (gamestate != GS_LEVEL) { @@ -718,7 +721,6 @@ void S_UpdateSounds(void) { player_t *player = &players[displayplayers[i]]; - memset(&listener[i], 0, sizeof (listener[i])); listenmobj[i] = NULL; if (player->awayviewtics)