]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/teamplay.qc
Show a connecting message instead of team change (fixes an age old "bug")
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / teamplay.qc
index b19597cdeb05c7c679bff8f537b64b94abc19ba9..f75df5e38a6a6fe3daa1e53c2a964402292f07eb 100644 (file)
@@ -163,6 +163,7 @@ void InitGameplayMode()
        if(g_onslaught)
        {
                ActivateTeamplay();
+               fraglimit_override = autocvar_g_onslaught_point_limit;
                have_team_spawns = -1; // request team spawns
                MUTATOR_ADD(gamemode_onslaught);
        }
@@ -845,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)
        {