]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Join queued player later
authorz411 <z411@omaera.org>
Sun, 28 May 2023 19:27:14 +0000 (15:27 -0400)
committerz411 <z411@omaera.org>
Sun, 28 May 2023 19:27:14 +0000 (15:27 -0400)
qcsrc/server/client.qc

index 5e4c5eaa320b66427a3f920065a39e68e19e12d5..b5899c2cf6462a7620193763b0d8d08a62279b9a 100644 (file)
@@ -1984,10 +1984,7 @@ void Join(entity this)
 
        entity queued_join = SpectatorWantsJoin(this);
        if(queued_join)
-       {
-               Join(queued_join);
                this.team_selected = false; // Don't let this player select team
-       }
 
        if(!this.team_selected)
        if(autocvar_g_campaign || autocvar_g_balance_teams || queued_join)
@@ -2010,6 +2007,9 @@ void Join(entity this)
                Send_Notification(NOTIF_ALL, NULL, MSG_INFO, INFO_JOIN_PLAY, this.netname);
        this.team_selected = false;
        this.wants_join = 0;
+
+       if(queued_join)
+               Join(queued_join);
 }
 
 int GetPlayerLimit()