Merge branch 'eid-disable-spectator-voice' into 'master'

Disable spectator voice in-level

See merge request kart-krew-dev/ring-racers-internal!2625
This commit is contained in:
Oni VelocitOni 2025-06-11 21:33:34 +00:00
commit 10043652b3

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;