From 5a01279c1080aee755f1d425bd30df198fba59c9 Mon Sep 17 00:00:00 2001 From: Antonio Martinez Date: Mon, 23 Jun 2025 15:00:18 -0400 Subject: [PATCH] Move join spectate below bot set, just in case --- src/d_clisrv.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/d_clisrv.c b/src/d_clisrv.c index 1e342a39f..b32a4a48a 100644 --- a/src/d_clisrv.c +++ b/src/d_clisrv.c @@ -3753,13 +3753,6 @@ static void Got_AddPlayer(const UINT8 **p, INT32 playernum) G_AddPlayer(newplayernum, console); memcpy(players[newplayernum].public_key, public_key, PUBKEYLENGTH); - // Previously called at the top of this function, commented as - // "caused desyncs in this spot :(". But we can't do this in - // G_PlayerReborn, since that only runs for level contexts and - // allows people to party-crash the vote screen even when - // maxplayers is too low for them. Let's try it here...? - G_SpectatePlayerOnJoin(newplayernum); - for (i = 0; i < MAXAVAILABILITY; i++) { newplayer->availabilities[i] = READUINT8(*p); @@ -3798,6 +3791,13 @@ static void Got_AddPlayer(const UINT8 **p, INT32 playernum) players[newplayernum].splitscreenindex = splitscreenplayer; players[newplayernum].bot = false; + // Previously called at the top of this function, commented as + // "caused desyncs in this spot :(". But we can't do this in + // G_PlayerReborn, since that only runs for level contexts and + // allows people to party-crash the vote screen even when + // maxplayers is too low for them. Let's try it here...? + G_SpectatePlayerOnJoin(newplayernum); + if (node == mynode && splitscreenplayer == 0) S_AttemptToRestoreMusic(); // Earliest viable point