]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/cl_client.qc
Make sure a vote is actually running before trying to count it when a client leaves
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / cl_client.qc
index 3f9fdd41bfdc615427f207152b2e56898db35e58..de2603437e253f69e2c2322706a55ba846f8c92f 100644 (file)
@@ -1244,6 +1244,9 @@ void ClientDisconnect ()
 
        self.playerid = 0;
        ReadyCount();
+       if(vote_called)
+       if(IS_REAL_CLIENT(self))
+               VoteCount(false);
 
        // free cvars
        GetCvars(-1);
@@ -1827,7 +1830,7 @@ void LeaveSpectatorMode()
 
                        PutClientInServer();
 
-                       if(IS_PLAYER(self)) { Send_Notification(NOTIF_ALL, world, MSG_INFO, ((teamplay) ? APP_TEAM_ENT_4(this, INFO_JOIN_PLAY_TEAM_) : INFO_JOIN_PLAY), self.netname); }
+                       if(IS_PLAYER(self)) { Send_Notification(NOTIF_ALL, world, MSG_INFO, ((teamplay && this.team != -1) ? APP_TEAM_ENT_4(this, INFO_JOIN_PLAY_TEAM_) : INFO_JOIN_PLAY), self.netname); }
                }
                else
                        stuffcmd(self, "menu_showteamselect\n");