From 0a7578472e967b3d158bb7e59c6029092aaece14 Mon Sep 17 00:00:00 2001 From: Alug Date: Sun, 13 Oct 2024 22:54:20 +0200 Subject: [PATCH] move this --- src/d_clisrv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index a3b688956..0ca7ba49f 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -3181,6 +3181,9 @@ void CL_RemovePlayer(INT32 playernum, INT32 reason) LUAh_PlayerQuit(&players[playernum], reason); // Lua hook for player quitting + if (playernum == displayplayers[0] && !demo.playback) + displayplayers[0] = consoleplayer; // don't look through someone's view who isn't there + // Reset player data CL_ClearPlayer(playernum); @@ -3200,9 +3203,6 @@ void CL_RemovePlayer(INT32 playernum, INT32 reason) RemoveAdminPlayer(playernum); // don't stay admin after you're gone } - if (playernum == displayplayers[0] && !demo.playback) - displayplayers[0] = consoleplayer; // don't look through someone's view who isn't there - LUA_InvalidatePlayer(&players[playernum]); if (G_BattleGametype()) // SRB2Kart