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 28, 2024
1 parent a3e40e5 commit 353b3d8
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 353b3d8

Please sign in to comment.