Disable spectator voice in-level

This commit is contained in:
Eidolon 2025-06-10 16:48:22 -05:00
parent 12bc1b9cca
commit f001f07f77

View file

@ -5239,6 +5239,12 @@ static void PT_HandleVoiceClient(SINT8 node, boolean isserver)
return;
}
if (G_GamestateUsesLevel() && players[playernum].spectator)
{
// ignore spectators in levels
return;
}
boolean terminal = (pl->flags & VOICE_PAK_FLAGS_TERMINAL_BIT) > 0;
UINT32 framesize = doomcom->datalength - BASEPACKETSIZE - sizeof(voice_pak);
UINT8 *frame = (UINT8*)(pl) + sizeof(voice_pak);
@ -5334,6 +5340,12 @@ static void PT_HandleVoiceServer(SINT8 node)
continue;
}
if (G_GamestateUsesLevel() && player->spectator)
{
// ignore spectators in levels
continue;
}
// Is this node P1 on that node?
boolean isp1onnode = nodetoplayer[pnode] >= 0 && nodetoplayer[pnode] < MAXPLAYERS;