fix passing garbage to mumble outside of levels

this just deadass passed the unitialized listener array into mumble
This commit is contained in:
Alug committed 2025-07-31 19:42:37 +02:00
1 parent dc9276b73c
commit dc00fa3429
1 file changed
+3 -1
+3 -1
View File
@@ -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)