]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Display a centreprint when unable to join due to locked teams
authorbones_was_here <bones_was_here@yahoo.com.au>
Thu, 11 Jun 2020 12:02:12 +0000 (22:02 +1000)
committerbones_was_here <bones_was_here@yahoo.com.au>
Thu, 11 Jun 2020 12:02:12 +0000 (22:02 +1000)
qcsrc/common/notifications/all.inc
qcsrc/server/client.qc

index a9a2ee655139555dfc70bb72ae875d9fc2061a28..f7a32ad1c887aad810c06925deba26f15e367477 100644 (file)
@@ -693,6 +693,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input !=
 
     MSG_CENTER_NOTIF(JOIN_NOSPAWNS,                     N_ENABLE,    0, 0, "",               CPID_PREVENT_JOIN,      "0 0",  _("^K1No spawnpoints available!\nHope your team can fix it..."), "")
     MSG_CENTER_NOTIF(JOIN_PREVENT,                      N_ENABLE,    0, 0, "",               CPID_PREVENT_JOIN,      "0 0",  _("^K1You may not join the game at this time.\nThe player limit reached maximum capacity."), "")
+    MSG_CENTER_NOTIF(JOIN_PREVENT_LOCKTEAMS,            N_ENABLE,    0, 0, "",               CPID_PREVENT_JOIN,      "0 0",  _("^K1You may not join the game at this time.\nThe teams are locked."), "")
 
     MSG_CENTER_NOTIF(KEEPAWAY_DROPPED,                  N_ENABLE,    1, 0, "s1",             CPID_KEEPAWAY,          "0 0",  _("^BG%s^BG has dropped the ball!"), "")
     MSG_CENTER_NOTIF(KEEPAWAY_PICKUP,                   N_ENABLE,    1, 0, "s1",             CPID_KEEPAWAY,          "0 0",  _("^BG%s^BG has picked up the ball!"), "")
index a0f5c8a38fc4e61c0457fd3549a6a40bb07a83ab..df5e2a31594cf704cba3be33cff376af971d62a9 100644 (file)
@@ -2030,6 +2030,11 @@ int nJoinAllowed(entity this, entity ignore)
                Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_JOIN_PREVENT);
                msg_time = time + 0.5;
        }
+       else if (this && ignore && teamplay && lockteams && time > msg_time)
+       {
+               Send_Notification(NOTIF_ONE_ONLY, this, MSG_CENTER, CENTER_JOIN_PREVENT_LOCKTEAMS);
+               msg_time = time + 0.5;
+       }
 
        return free_slots;
 }