]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
CA: Don't try to join the game with jump button if observer is already scheduled...
authorterencehill <piuntn@gmail.com>
Tue, 5 Mar 2013 23:40:42 +0000 (00:40 +0100)
committerterencehill <piuntn@gmail.com>
Tue, 5 Mar 2013 23:40:42 +0000 (00:40 +0100)
qcsrc/server/cl_client.qc

index c0ca7e8a0be09e31ae0429606b69fcb6c0359927..6cc31509832ad1b6d0a9538af64af7fc7a7974b8 100644 (file)
@@ -2257,6 +2257,8 @@ void ShowRespawnCountdown()
 .float prevent_join_msgtime;
 void LeaveSpectatorMode()
 {
+       if(self.caplayer)
+               return;
        if(nJoinAllowed(self)) {
                if(!teamplay || autocvar_g_campaign || autocvar_g_balance_teams || (self.wasplayer && autocvar_g_changeteam_banned) || self.team_forced > 0) {
                        self.classname = "player";
@@ -2281,12 +2283,8 @@ void LeaveSpectatorMode()
                                Send_CSQC_Centerprint_Generic_Expire(self, CPID_PREVENT_JOIN);
                                self.prevent_join_msgtime = 0;
                        }
-
-                       return;
                } else {
-                       if(!self.caplayer)
-                               stuffcmd(self,"menu_showteamselect\n");
-                       return;
+                       stuffcmd(self, "menu_showteamselect\n");
                }
        }
        else {