]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Clear title when starting a round based match
authorz411 <z411@omaera.org>
Fri, 1 Apr 2022 22:25:30 +0000 (19:25 -0300)
committerz411 <z411@omaera.org>
Fri, 1 Apr 2022 22:25:30 +0000 (19:25 -0300)
qcsrc/client/announcer.qc

index 6a211246f3047bba3b7c49e5f394cebe571f706e..5a004e04f5d8d7ada18677fa4c0a57bd7c8bec86 100644 (file)
@@ -20,6 +20,7 @@ string AnnouncerOption()
 
 entity announcer_countdown;
 
+bool prev_inround;
 void Announcer_Countdown(entity this)
 {
        float starttime = STAT(GAMESTARTTIME);
@@ -50,6 +51,7 @@ void Announcer_Countdown(entity this)
        {
                if(inround)
                {
+                       if(!prev_inround) centerprint_ClearTitle(); // clear title if we just started the match
                        Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_ROUNDSTART, STAT(ROUNDS_PLAYED) + 1, countdown_rounded);
                        Notification annce_num = Announcer_PickNumber(CNT_ROUNDSTART, countdown_rounded);
                        if(annce_num != NULL)
@@ -65,6 +67,8 @@ void Announcer_Countdown(entity this)
                        this.nextthink = (starttime - (countdown - 1));
                }
        }
+
+       prev_inround = inround;
 }
 
 /**