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.
This commit is contained in:
toaster 2022-03-27 20:19:10 +01:00
parent af1177a92e
commit 1beee50942

View file

@ -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]];