From: terencehill Date: Sat, 30 Jan 2016 10:11:25 +0000 (+0100) Subject: Kill countdown (centerprint) to game start if the game ended in the meantime X-Git-Tag: xonotic-v0.8.2~1208^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=54422dc7dd83d5c2b97a0e2317b9729b01f0679a;p=xonotic%2Fxonotic-data.pk3dir.git Kill countdown (centerprint) to game start if the game ended in the meantime --- diff --git a/qcsrc/client/announcer.qc b/qcsrc/client/announcer.qc index 707e3c8a7..680060cdb 100644 --- a/qcsrc/client/announcer.qc +++ b/qcsrc/client/announcer.qc @@ -77,6 +77,19 @@ void Announcer_Gamestart() float roundstarttime = STAT(ROUNDSTARTTIME); if(roundstarttime > startTime) startTime = roundstarttime; + if(intermission) + { + if(announcer_countdown) + { + centerprint_kill(CPID_ROUND); + if(announcer_countdown) + { + remove(announcer_countdown); + announcer_countdown = NULL; + } + } + return; + } if(previous_game_starttime != startTime) { diff --git a/qcsrc/client/hud/panel/centerprint.qc b/qcsrc/client/hud/panel/centerprint.qc index 3169d925d..0c64aa00a 100644 --- a/qcsrc/client/hud/panel/centerprint.qc +++ b/qcsrc/client/hud/panel/centerprint.qc @@ -87,6 +87,11 @@ void centerprint_generic(int new_id, string strMessage, float duration, int coun centerprint_countdown_num[j] = countdown_num; } +void centerprint_kill(float id) +{ + centerprint_generic(id, "", 0, 0); +} + void centerprint_hud(string strMessage) { centerprint_generic(0, strMessage, autocvar_hud_panel_centerprint_time, 0); diff --git a/qcsrc/client/main.qh b/qcsrc/client/main.qh index 31db3f86e..bed4daa26 100644 --- a/qcsrc/client/main.qh +++ b/qcsrc/client/main.qh @@ -125,6 +125,7 @@ float camera_roll; vector camera_direction; void centerprint_hud(string strMessage); +void centerprint_kill(float id); void centerprint_generic(float new_id, string strMessage, float duration, float countdown_num); const float ALPHA_MIN_VISIBLE = 0.003;