]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Kill countdown (centerprint) to game start if the game ended in the meantime
authorterencehill <piuntn@gmail.com>
Sat, 30 Jan 2016 10:11:25 +0000 (11:11 +0100)
committerGitLab <gitlab@gitlab.com>
Sat, 30 Jan 2016 12:27:27 +0000 (12:27 +0000)
qcsrc/client/announcer.qc
qcsrc/client/hud/panel/centerprint.qc
qcsrc/client/main.qh

index 707e3c8a7657e5b6c8d3495cefe5875ff1111e83..680060cdbe0f3f764d6a2b8a5746471774ebffae 100644 (file)
@@ -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)
        {
index 3169d925d24193c34502ed05cfe349d76a66eb38..0c64aa00a9039eb6d74d0cb3f6a0a954289dc8ec 100644 (file)
@@ -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);
index 31db3f86e7217733a044b282caaa8dabe7d31ec3..bed4daa268dc2a4afbe08995d70d7b3930913ca7 100644 (file)
@@ -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;