From 1beee5094224e4ce0fcde1e3f4eb24d6de30ba64 Mon Sep 17 00:00:00 2001 From: toaster Date: Sun, 27 Mar 2022 20:19:10 +0100 Subject: [PATCH] Fixed the conditions where bad splitscreen player reads were occuring in P_EndingMusic. Was only evident when someone joined and then left the 3p or 4p position of party, which is why we didn't discover it in testing. --- src/p_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index 39a1afc9f..8cc74c837 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -730,8 +730,8 @@ boolean P_EndingMusic(player_t *player) if (!((players[localplayertable[0]].exiting || (players[localplayertable[0]].pflags & PF_NOCONTEST)) || (players[localplayertable[1]].exiting || (players[localplayertable[1]].pflags & PF_NOCONTEST)) - || ((r_splitscreen < 2) && (players[localplayertable[2]].exiting || (players[localplayertable[2]].pflags & PF_NOCONTEST))) - || ((r_splitscreen < 3) && (players[localplayertable[3]].exiting || (players[localplayertable[3]].pflags & PF_NOCONTEST))))) + || ((r_splitscreen > 1) && (players[localplayertable[2]].exiting || (players[localplayertable[2]].pflags & PF_NOCONTEST))) + || ((r_splitscreen > 2) && (players[localplayertable[3]].exiting || (players[localplayertable[3]].pflags & PF_NOCONTEST))))) return false; bestlocalplayer = &players[localplayertable[0]];