Reset DISPLAYPLAYERS if someone leaves

This commit is contained in:
James R 2020-06-06 22:28:13 -07:00
parent d82859e108
commit cbcbe9f15b
2 changed files with 2 additions and 10 deletions

View file

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

View file

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