]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/announcer.qc
Silence a warning when countdown number is higher than the available announcements
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / announcer.qc
index 12d07d15044dd50ea036f4b84c5a6fde75cbbf8d..016c87f326d298db2debceaeeb6688f8bc9670d0 100644 (file)
@@ -51,12 +51,16 @@ void Announcer_Countdown()
                if(roundstarttime == starttime)
                {
                        Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_ROUNDSTART, countdown_rounded);
-                       Local_Notification(MSG_ANNCE, Announcer_PickNumber(CNT_ROUNDSTART, countdown_rounded));
+                       Notification annce_num = Announcer_PickNumber(CNT_ROUNDSTART, countdown_rounded);
+                       if(annce_num != NULL)
+                               Local_Notification(MSG_ANNCE, annce_num);
                }
                else
                {
                        Local_Notification(MSG_CENTER, CENTER_COUNTDOWN_GAMESTART, countdown_rounded);
-                       Local_Notification(MSG_ANNCE, Announcer_PickNumber(CNT_GAMESTART, countdown_rounded));
+                       Notification annce_num = Announcer_PickNumber(CNT_GAMESTART, countdown_rounded);
+                       if(annce_num != NULL)           
+                               Local_Notification(MSG_ANNCE, Announcer_PickNumber(CNT_GAMESTART, countdown_rounded));
                }
 
                this.nextthink = (starttime - (countdown - 1));