]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Show a connecting message instead of team change (fixes an age old "bug")
authorMario <zacjardine@y7mail.com>
Tue, 25 Aug 2015 12:12:12 +0000 (22:12 +1000)
committerMario <zacjardine@y7mail.com>
Tue, 25 Aug 2015 12:12:38 +0000 (22:12 +1000)
qcsrc/common/notifications.qh
qcsrc/server/teamplay.qc

index cc7b397a49ad3d63855336fd89b1667bebfe9bbe..cde5576897f502d0b890d6085a51cf035dc70f9e 100644 (file)
@@ -346,6 +346,7 @@ void Send_Notification_WOCOVA(
     MULTITEAM_INFO##teams(default,prefix,strnum,flnum,args,hudargs,icon,normal,gentle)
 
 #define MSG_INFO_NOTIFICATIONS \
+    MSG_INFO_NOTIF(1, INFO_CONNECTING,                     1, 0, "s1", "",                          "",                     _("^BG%s^BG is connecting..."), "") \
     MSG_INFO_NOTIF(2, INFO_CHAT_NOSPECTATORS,              0, 0, "", "",                            "",                     _("^F4NOTE: ^BGSpectator chat is not sent to players during the match"), "") \
     MULTITEAM_INFO(1, INFO_CTF_CAPTURE_, 4,                1, 0, "s1", "s1",                        "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag"), "") \
     MULTITEAM_INFO(1, INFO_CTF_CAPTURE_BROKEN_, 4,         2, 2, "s1 f1p2dec s2 f2p2dec", "s1",     "notify_%s_captured",   _("^BG%s^BG captured the ^TC^TT^BG flag in ^F1%s^BG seconds, breaking ^BG%s^BG's previous record of ^F2%s^BG seconds"), "") \
index b50c49eb5a0eb21ea00220485eb5b9f8060f90e8..f75df5e38a6a6fe3daa1e53c2a964402292f07eb 100644 (file)
@@ -846,7 +846,11 @@ void SV_ChangeTeam(float _color)
                TeamchangeFrags(self);
        }
 
-       SetPlayerTeam(self, dteam, steam, false);
+       // 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_ONE, self, MSG_INFO, INFO_CONNECTING, self.netname);
+
+       SetPlayerTeam(self, dteam, steam, !IS_CLIENT(self));
 
        if(IS_PLAYER(self) && steam != dteam)
        {