From dc00fa3429550529e53bae749ef39f1786d587f8 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 28680c610..1c1dc08ff 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -630,6 +630,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) @@ -695,6 +696,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) { @@ -714,7 +717,6 @@ void S_UpdateSounds(void) { player_t *player = &players[displayplayers[i]]; - memset(&listener[i], 0, sizeof (listener[i])); listenmobj[i] = NULL; if (player->awayviewtics)