]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Added infinite timeout (-1)
authorz411 <z411@omaera.org>
Sun, 23 Aug 2020 16:06:34 +0000 (12:06 -0400)
committerz411 <z411@omaera.org>
Sun, 23 Aug 2020 16:06:34 +0000 (12:06 -0400)
qcsrc/common/notifications/all.inc
qcsrc/server/command/common.qc

index be50af1ee2923acc8ba5e5a641c99712c95c5e43..a85753771a6afef235c2eb06cbcff98cb03fc5e0 100644 (file)
@@ -785,6 +785,7 @@ string multiteam_info_sprintf(string input, string teamname) { return ((input !=
 
     MSG_CENTER_NOTIF(TIMEOUT_BEGINNING,                 N_ENABLE,    0, 1, "",               CPID_TIMEOUT,           "1 f1", _("^F4Timeout begins in ^COUNT"), "")
     MSG_CENTER_NOTIF(TIMEOUT_ENDING,                    N_ENABLE,    0, 1, "",               CPID_TIMEIN,            "1 f1", _("^F4Timeout ends in ^COUNT"), "")
+       MSG_CENTER_NOTIF(TIMEOUT_ONGOING,                   N_ENABLE,    0, 0, "",               CPID_TIMEIN,            "1 f1", _("^F4Match paused."), "")
 
     MSG_CENTER_NOTIF(JOIN_PREVENT_MINIGAME,             N_ENABLE,    0, 0, "",               CPID_Null,              "0 0",  _("^K1Cannot join given minigame session!"), "" )
 
index 7df8084fd38c04e4e26d47208c92ba0c5a4b8e12..26b30dd158e5f040007fde344f220f076a360633 100644 (file)
@@ -212,6 +212,11 @@ void timeout_handler_think(entity this)
                                this.nextthink = time + TIMEOUT_SLOWMO_VALUE;       // think again in one second
                                timeout_time -= 1;                                  // decrease the time counter
                        }
+                       else if (timeout_time == -1)  // infinite timer
+                       {
+                               Send_Notification(NOTIF_ALL, NULL, MSG_CENTER, CENTER_TIMEOUT_ONGOING);
+                               this.nextthink = time + TIMEOUT_SLOWMO_VALUE;
+                       }
                        else  // time to end the timeout
                        {
                                Kill_Notification(NOTIF_ALL, NULL, MSG_CENTER, CPID_TIMEIN);