From ce4de6e495916006c635f48c9993e625e3203d7a Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Sun, 27 Oct 2024 19:50:02 -0400 Subject: [PATCH] Fix: Only play "Player is exiting" audio when player slot drops (ignore spectators) --- src/multijoin.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/multijoin.cpp b/src/multijoin.cpp index cabcad22a17..8ee450cd032 100644 --- a/src/multijoin.cpp +++ b/src/multijoin.cpp @@ -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.