Skip to content

Commit

Permalink
Fix: Only play "Player is exiting" audio when player slot drops (igno…
Browse files Browse the repository at this point in the history
…re spectators)
  • Loading branch information
past-due committed Oct 27, 2024
1 parent 6b173db commit ce4de6e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/multijoin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,10 @@ bool MultiPlayerLeave(UDWORD playerIndex)

if (widgGetFromID(psWScreen, IDRET_FORM))
{
audio_QueueTrack(ID_CLAN_EXIT);
if (playerIndex < MAX_PLAYERS) // only play audio when *player* slots drop (ignore spectator slots)
{
audio_QueueTrack(ID_CLAN_EXIT);
}
}

// fire script callback to reassign skirmish players.
Expand Down

0 comments on commit ce4de6e

Please sign in to comment.