]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix a bug where the message "You cannot change to a larger team" was displayed in...
authorterencehill <piuntn@gmail.com>
Wed, 23 Dec 2015 12:42:54 +0000 (13:42 +0100)
committerterencehill <piuntn@gmail.com>
Wed, 23 Dec 2015 12:42:54 +0000 (13:42 +0100)
qcsrc/server/teamplay.qc

index 0662aab68ece77f479b001efc99f4a11cee5c488..80b0817ca2889a578a9f3f3dde114c875082dea4 100644 (file)
@@ -588,6 +588,13 @@ void SV_ChangeTeam(float _color)
                return;
        }
 
+       if(!IS_CLIENT(self))
+       {
+               // since this is an engine function, and gamecode doesn't have any calls earlier than this, do the connecting message here
+               Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_CONNECTING, self.netname);
+               return;
+       }
+
        scolor = self.clientcolors & 0x0F;
        dcolor = _color & 0x0F;
 
@@ -647,10 +654,6 @@ void SV_ChangeTeam(float _color)
                TeamchangeFrags(self);
        }
 
-       // since this is an engine function, and gamecode doesn't have any calls earlier than this, do the connecting message here
-       if(!IS_CLIENT(self))
-               Send_Notification(NOTIF_ALL, world, MSG_INFO, INFO_CONNECTING, self.netname);
-
        MUTATOR_CALLHOOK(Player_ChangeTeam, self, steam, dteam);
 
        SetPlayerTeam(self, dteam, steam, !IS_CLIENT(self));