From: terencehill Date: Tue, 20 Sep 2016 16:18:41 +0000 (+0200) Subject: Make timeout countdown message immediately fully visible otherwise it stays almost... X-Git-Tag: xonotic-v0.8.2~555^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F370%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Make timeout countdown message immediately fully visible otherwise it stays almost invisible as it starts fading in VERY slowly (due to slowmo being set to 0.0001 during a timeout) --- diff --git a/qcsrc/client/hud/panel/centerprint.qc b/qcsrc/client/hud/panel/centerprint.qc index 5b8069010..f67cbffbd 100644 --- a/qcsrc/client/hud/panel/centerprint.qc +++ b/qcsrc/client/hud/panel/centerprint.qc @@ -1,6 +1,7 @@ #include "centerprint.qh" #include "scoreboard.qh" +#include // 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; diff --git a/qcsrc/common/notifications/all.inc b/qcsrc/common/notifications/all.inc index e6be6b100..8b585d7e8 100644 --- a/qcsrc/common/notifications/all.inc +++ b/qcsrc/common/notifications/all.inc @@ -742,7 +742,7 @@ 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!"), "" ) diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index e7a02dd65..d2682a148 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -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 */ diff --git a/qcsrc/server/command/common.qc b/qcsrc/server/command/common.qc index 35418a02f..ec1f9c89f 100644 --- a/qcsrc/server/command/common.qc +++ b/qcsrc/server/command/common.qc @@ -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