]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make timeout countdown message immediately fully visible otherwise it stays almost... 370/head
authorterencehill <piuntn@gmail.com>
Tue, 20 Sep 2016 16:18:41 +0000 (18:18 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 20 Sep 2016 23:13:07 +0000 (01:13 +0200)
qcsrc/client/hud/panel/centerprint.qc
qcsrc/common/notifications/all.inc
qcsrc/common/notifications/all.qh
qcsrc/server/command/common.qc

index 5b80690101b089e0e2cd15df07d40aa05bb9356a..f67cbffbd04d176160d072b1e6bddcbfe3e045b0 100644 (file)
@@ -1,6 +1,7 @@
 #include "centerprint.qh"
 
 #include "scoreboard.qh"
+#include <common/notifications/all.qh>
 
 // CenterPrint (#16)
 
@@ -246,6 +247,9 @@ void HUD_CenterPrint ()
                else // Expiring soon, so fade it out.
                        a = (centerprint_expire_time[j] - time) / max(0.0001, autocvar_hud_panel_centerprint_fade_out);
 
+               if(centerprint_msgID[j] == CPID_TIMEIN)
+                       a = 1;
+
                // while counting down show it anyway in order to hold the current message position
                if (a <= 0.5/255.0 && centerprint_countdown_num[j] == 0)  // Guaranteed invisible - don't show.
                        continue;
index e6be6b1007c30ce0a6de83607c674ac98b9d9dc9..8b585d7e8107a3132111f8bf582e113281259417 100644 (file)
     MSG_CENTER_NOTIF(TEAMCHANGE_SUICIDE,                1,      0, 1, "",               CPID_TEAMCHANGE,        "1 f1", _("^K1Suicide in ^COUNT"), "")
 
     MSG_CENTER_NOTIF(TIMEOUT_BEGINNING,                 1,      0, 1, "",               CPID_TIMEOUT,           "1 f1", _("^F4Timeout begins in ^COUNT"), "")
-    MSG_CENTER_NOTIF(TIMEOUT_ENDING,                    1,      0, 1, "",               CPID_TIMEOUT,           "1 f1", _("^F4Timeout ends in ^COUNT"), "")
+    MSG_CENTER_NOTIF(TIMEOUT_ENDING,                    1,      0, 1, "",               CPID_TIMEIN,            "1 f1", _("^F4Timeout ends in ^COUNT"), "")
 
     MSG_CENTER_NOTIF(JOIN_PREVENT_MINIGAME,             1,      0, 0, "",               CPID_Null,              "0 0",  _("^K1Cannot join given minigame session!"), "" )
 
index e7a02dd65947354eec106c17a68275eebfeb2a85..d2682a148f70c937ea202d0ed7e1b1822109b114 100644 (file)
@@ -65,6 +65,7 @@ ENUMCLASS(CPID)
        CASE(CPID, RACE_FINISHLAP)
        CASE(CPID, TEAMCHANGE)
        CASE(CPID, TIMEOUT)
+       CASE(CPID, TIMEIN)
        CASE(CPID, VEHICLES)
        CASE(CPID, VEHICLES_OTHER)
        /** always last */
index 35418a02f07d420a9e0805f341a73cbaa6632ca5..ec1f9c89fa7adce3f5887a553f998c701faec3f7 100644 (file)
@@ -210,6 +210,7 @@ void timeout_handler_think(entity this)
                        }
                        else  // time to end the timeout
                        {
+                               Kill_Notification(NOTIF_ALL, NULL, MSG_CENTER, CPID_TIMEIN);
                                timeout_status = TIMEOUT_INACTIVE;
 
                                // reset the slowmo value back to normal