]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/notifications/all.qc
Let announcer queue guess announcer length
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / notifications / all.qc
index 685febf0fdfbdab915e8c516ca8baaef3e8502c0..c8bcb6a68df6c172b4c2812978dcc34be18ccf71 100644 (file)
@@ -1200,7 +1200,8 @@ void Local_Notification_Queue_Add(MSG net_type, entity notif, float queue_time)
        if(queue_time == -1 || time > notif_queue_next_time) {
                // Run immediately
                Local_Notification_Queue_Run(net_type, notif);
-               notif_queue_next_time = time + queue_time;
+               if(queue_time >= 0)
+                       notif_queue_next_time = time + (queue_time == 0 ? soundlength(AnnouncerFilename(notif.nent_snd)) : queue_time);
        } else {
                // Put in queue
                if(notif_queue_length >= NOTIF_QUEUE_MAX) return;