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 707e3c8..680060c 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 3169d92..0c64aa0 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 31db3f8..bed4daa 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;