From edf4f7c205f9fed3e522c01a318abf928db5ddf4 Mon Sep 17 00:00:00 2001 From: toaster Date: Wed, 28 Feb 2024 20:02:23 +0000 Subject: [PATCH] Got_TeamChange: Successfully remove PF_WANTSTOJOIN if you use `changeteam spectator` to cancel your join --- src/d_netcmd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index e4440b008..0523c2079 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3708,11 +3708,15 @@ static void Got_Teamchange(const UINT8 **cp, INT32 playernum) //Now that we've done our error checking and killed the player //if necessary, put the player on the correct team/status. + // This serves us in both teamchange contexts. if (NetPacket.packet.newteam != 0) { - // This serves us in both teamchange contexts. players[playernum].pflags |= PF_WANTSTOJOIN; } + else + { + players[playernum].pflags &= ~PF_WANTSTOJOIN; + } if (G_GametypeHasTeams()) {