From cbcbe9f15bdd8d6daa5f3e80dd0f0ea89a6c4d53 Mon Sep 17 00:00:00 2001 From: James R Date: Sat, 6 Jun 2020 22:28:13 -0700 Subject: [PATCH] Reset DISPLAYPLAYERS if someone leaves --- src/d_clisrv.c | 4 ++-- src/g_game.c | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 001a95ea8..3e5544329 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -2766,8 +2766,8 @@ void CL_RemovePlayer(INT32 playernum, INT32 reason) RemoveAdminPlayer(playernum); // don't stay admin after you're gone } - if (playernum == g_localplayers[0] && !demo.playback) - g_localplayers[0] = consoleplayer; // don't look through someone's view who isn't there + if (playernum == displayplayers[0] && !demo.playback) + displayplayers[0] = consoleplayer; // don't look through someone's view who isn't there #ifdef HAVE_BLUA LUA_InvalidatePlayer(&players[playernum]); diff --git a/src/g_game.c b/src/g_game.c index ebbf60e3d..6d7597905 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -1765,14 +1765,6 @@ void G_DoLoadLevel(boolean resetplayer) if (!resetplayer) P_FindEmerald(); - g_localplayers[0] = consoleplayer; // view the guy you are playing - - for (i = 0; i < MAXSPLITSCREENPLAYERS; i++) - { - if (i > 0 && r_splitscreen < i) - g_localplayers[i] = consoleplayer; - } - gameaction = ga_nothing; #ifdef PARANOIA Z_CheckHeap(-2);