From 89eac846d26c6752c3ba14282605cb509c75bca5 Mon Sep 17 00:00:00 2001 From: Noah Metzger Date: Fri, 15 Sep 2023 18:38:48 -0500 Subject: [PATCH] fix unnecessary left the game message when eliminated player disconnects --- code/game/mods/modes/elimination/elim_tweaks.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/mods/modes/elimination/elim_tweaks.c b/code/game/mods/modes/elimination/elim_tweaks.c index f4a2704..408e72d 100644 --- a/code/game/mods/modes/elimination/elim_tweaks.c +++ b/code/game/mods/modes/elimination/elim_tweaks.c @@ -236,7 +236,6 @@ static void MOD_PREFIX(PostPlayerDie)( MODFN_CTV, gentity_t *self, gentity_t *in */ static void MOD_PREFIX(PrePlayerLeaveTeam)( MODFN_CTV, int clientNum, team_t oldTeam ) { gclient_t *client = &level.clients[clientNum]; - MODFN_NEXT( PrePlayerLeaveTeam, ( MODFN_NC, clientNum, oldTeam ) ); #ifdef FEATURE_ELIMINATED_MESSAGES if ( level.matchState == MS_ACTIVE && client->pers.connected == CON_CONNECTED && @@ -246,6 +245,10 @@ static void MOD_PREFIX(PrePlayerLeaveTeam)( MODFN_CTV, int clientNum, team_t old ModElimTweaks_EliminatedMessage( clientNum, oldTeam, qfalse ); } #endif + + // Call this last, since it may reset eliminated status in elim_main.c + // and break ModElimination_Static_IsPlayerEliminated. + MODFN_NEXT( PrePlayerLeaveTeam, ( MODFN_NC, clientNum, oldTeam ) ); } /*