]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Partly fix wait message
authorSamual Lenks <samual@xonotic.org>
Fri, 1 Mar 2013 20:56:27 +0000 (15:56 -0500)
committerSamual Lenks <samual@xonotic.org>
Fri, 1 Mar 2013 20:56:27 +0000 (15:56 -0500)
qcsrc/common/notifications.qh
qcsrc/server/mutators/gamemode_keyhunt.qc

index 421e958be997d5a74075936cbf18c9ae6e1107dc..00c9f08aca3d557c4dfdc52220ba653f6a0497a7 100644 (file)
@@ -447,9 +447,9 @@ void Send_CSQC_Centerprint_Generic(entity e, float id, string s, float duration,
        MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_HELP,                                        0, 0, "",                               CPID_KEYHUNT,                   "0 0", _("^BGAll keys are in your team's hands!\nHelp the key carriers to meet!"), "") \
        MULTITEAM_CENTER(1, CENTER_KEYHUNT_INTERFERE_, 4,                       0, 0, "",                               CPID_KEYHUNT,                   "0 0", _("^BGAll keys are in ^TC^TT team^BG's hands!\nInterfere ^F4NOW^BG!"), "") \
        MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_MEET,                                        0, 0, "",                               CPID_KEYHUNT,                   "0 0", _("^BGAll keys are in your team's hands!\nMeet the other key carriers ^F4NOW^BG!"), "") \
-       MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_SCAN,                                        0, 0, "",                               CPID_KEYHUNT,                   "-1 0", _("^BGScanning frequency range..."), "") \
+       MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_SCAN,                                        0, 0, "",                               CPID_KEYHUNT,                   "0 0", _("^BGScanning frequency range..."), "") \
        MULTITEAM_CENTER(1, CENTER_KEYHUNT_START_, 4,                           0, 0, "",                               CPID_KEYHUNT,                   "0 0", _("^BGYou are starting with the ^TC^TT key"), "") \
-       MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_WAIT,                                        0, 4, "kh_teams",               CPID_KEYHUNT,                   "-1 0", _("^BGWaiting for players to join...\nNeed active players for: %s"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_WAIT,                                        0, 4, "kh_teams",               CPID_KEYHUNT,                   "0 0", _("^BGWaiting for players to join...\nNeed active players for: %s"), "") \
        MSG_CENTER_NOTIF(1, CENTER_LMS_CAMPCHECK,                                       0, 0, "",                               CPID_LMS_CAMP,                  "0 0", _("^F2Don't camp!"), "") \
        MSG_CENTER_NOTIF(1, CENTER_MOTD,                                                        1, 0, "s1",                             CPID_MOTD,                              "-1 0", _("^BG%s"), "") \
        MSG_CENTER_NOTIF(1, CENTER_MINSTA_FINDAMMO,                                     0, 0, "",                               CPID_MINSTA_FINDAMMO,   "1 9", _("^F4^COUNT^BG left to find some ammo!"), "") \
@@ -734,22 +734,22 @@ string notif_arg_kh_teams(float f1, float f2, float f3, float f4)
 {
        return sprintf("%s%s%s%s",
                (f1 ?
-                       sprintf("%s%s", Team_ColoredFullName(f1), ((f2 + f3 + f4) ? ", " : ""))
+                       sprintf("%s%s", Team_ColoredFullName(f1 - 1), ((f2 + f3 + f4) ? ", " : ""))
                        :
                        ""
                ),
                (f2 ?
-                       sprintf("%s%s", Team_ColoredFullName(f2), ((f3 + f4) ? ", " : ""))
+                       sprintf("%s%s", Team_ColoredFullName(f2 - 1), ((f3 + f4) ? ", " : ""))
                        :
                        ""
                ),
                (f3 ?
-                       sprintf("%s%s", Team_ColoredFullName(f3), (f4 ? ", " : ""))
+                       sprintf("%s%s", Team_ColoredFullName(f3 - 1), (f4 ? ", " : ""))
                        :
                        ""
                ),
                (f4 ?
-                       Team_ColoredFullName(f4)
+                       Team_ColoredFullName(f4 - 1)
                        :
                        ""
                )
index 9a84d65cb8edc2f33d4fbca446c81a4f82b70cc1..de12e76cb4f036c74f64fe5dfda4b09c3f4d7520 100644 (file)
@@ -128,13 +128,13 @@ void kh_Controller_SetThink(float t, kh_Think_t func)  // runs occasionaly
        if(t == 0)
                kh_controller.nextthink = time; // force
 }
-
+void kh_WaitForPlayers();
 void kh_Controller_Think()  // called a lot
 {
        if(intermission_running)
                return;
        if(self.cnt > 0)
-               self.cnt -= 1;
+       { if(self.think != kh_WaitForPlayers) { self.cnt -= 1; } }
        else if(self.cnt == 0)
        {
                self.cnt -= 1;
@@ -855,7 +855,7 @@ void kh_WaitForPlayers()  // delay start of the round until enough players are p
        }
 
        float p1 = kh_CheckPlayers(0), p2 = kh_CheckPlayers(1), p3 = kh_CheckPlayers(2), p4 = kh_CheckPlayers(3);
-       if(p1 || p2 || p3 || p4)
+       if not(p1 || p2 || p3 || p4)
        {
                Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_ARENA_ROUNDSTART, autocvar_g_balance_keyhunt_delay_round);
                kh_Controller_SetThink(autocvar_g_balance_keyhunt_delay_round, kh_StartRound);