From: Mario Date: Sun, 21 Aug 2016 14:41:04 +0000 (+1000) Subject: Intrusify notifications X-Git-Tag: xonotic-v0.8.2~663^2~18 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=280cc7f8d6a7123918b08858ee3a62d81f64c073;p=xonotic%2Fxonotic-data.pk3dir.git Intrusify notifications --- diff --git a/qcsrc/common/notifications/all.qc b/qcsrc/common/notifications/all.qc index acd570d0b..dd5f3a164 100644 --- a/qcsrc/common/notifications/all.qc +++ b/qcsrc/common/notifications/all.qc @@ -1532,8 +1532,8 @@ void Kill_Notification( net_notif.nent_net_name = ORDINAL(net_cpid); Net_LinkEntity(net_notif, false, autocvar_notification_lifetime_runtime, Net_Write_Notification); - FOREACH_ENTITY_CLASS( - "net_notification", + IL_EACH( + g_notifications, (it.owner.nent_type == net_type || net_type == MSG_Null) && (it.owner.nent_cpid == net_cpid || net_cpid == CPID_Null), { it.nent_net_name = -1; @@ -1682,6 +1682,7 @@ void Send_Notification( else { entity net_notif = new_pure(net_notification); + IL_PUSH(g_notifications, net_notif); net_notif.owner = notif; net_notif.nent_broadcast = broadcast; net_notif.nent_client = client; diff --git a/qcsrc/common/notifications/all.qh b/qcsrc/common/notifications/all.qh index 271592594..ccdcc690a 100644 --- a/qcsrc/common/notifications/all.qh +++ b/qcsrc/common/notifications/all.qh @@ -225,6 +225,11 @@ string prev_soundfile; float prev_soundtime; #endif +#ifdef SVQC +IntrusiveList g_notifications; +STATIC_INIT(g_notifications) { g_notifications = IL_NEW(); } +#endif + #ifdef SVQC ENUMCLASS(NOTIF) /** send to one client and their spectators */