From 954071d7c9aa3146ce1ca5a8f8604eebffc0dfe5 Mon Sep 17 00:00:00 2001 From: z411 Date: Sun, 23 Aug 2020 12:06:34 -0400 Subject: [PATCH] Added infinite timeout (-1) --- qcsrc/common/notifications/all.inc | 1 + qcsrc/server/command/common.qc | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/qcsrc/common/notifications/all.inc b/qcsrc/common/notifications/all.inc index be50af1ee..a85753771 100644 --- a/qcsrc/common/notifications/all.inc +++ b/qcsrc/common/notifications/all.inc @@ -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!"), "" ) diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index 7df8084fd..26b30dd15 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -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); -- 2.39.2