From: Mario Date: Fri, 18 Mar 2016 02:51:56 +0000 (+1000) Subject: Silence a warning when countdown number is higher than the available announcements X-Git-Tag: xonotic-v0.8.2~1066 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=be4b364c5f9bcc722170b51bb802477288aea913;p=xonotic%2Fxonotic-data.pk3dir.git Silence a warning when countdown number is higher than the available announcements --- diff --git a/qcsrc/client/announcer.qc b/qcsrc/client/announcer.qc index 12d07d150..016c87f32 100644 --- a/qcsrc/client/announcer.qc +++ b/qcsrc/client/announcer.qc @@ -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));