From cdc2b8731d2f503ae247d362899bb3f8b823eef7 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Sat, 2 Mar 2013 16:26:30 -0500 Subject: [PATCH] Slight cleanup --- qcsrc/common/notifications.qc | 30 ++++++++++-------------------- qcsrc/common/notifications.qh | 1 - 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index bb07c0b7d..cc87cb72e 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -1066,25 +1066,15 @@ void Read_Notification(float is_new) void Net_Notification_Remove() { if not(self) { dprint(sprintf("Net_Notification_Remove() at %f: Missing self!?\n", time)); return; } + #ifdef NOTIFICATIONS_DEBUG - if(self.nent_net_name == -1) - { - dprint(sprintf( - "Net_Notification_Remove() at %f: Killed '%s - %s' notification\n", - time, - Get_Notif_TypeName(self.nent_net_type), - self.nent_realent.nent_name - )); - } - else - { - dprint(sprintf( - "Net_Notification_Remove() at %f: Removed '%s - %s' notification\n", - time, - Get_Notif_TypeName(self.nent_net_type), - self.nent_realent.nent_name - )); - } + dprint(sprintf( + "Net_Notification_Remove() at %f: %s '%s - %s' notification\n", + ((self.nent_net_name == -1) ? "Killed" : "Removed"), + time, + Get_Notif_TypeName(self.nent_net_type), + self.owner.nent_name + )); #endif float i; @@ -1250,7 +1240,7 @@ void Kill_Notification( { if(killed_cpid != NO_CPID) { - if(notif.nent_realent.nent_cpid == killed_cpid) + if(notif.owner.nent_cpid == killed_cpid) { notif.nent_net_name = -1; notif.nextthink = time; @@ -1332,7 +1322,7 @@ void Send_Notification( #endif entity net_notif = spawn(); - net_notif.nent_realent = notif; + net_notif.owner = notif; net_notif.classname = "net_notification"; net_notif.nent_broadcast = broadcast; net_notif.nent_client = client; diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 8c594245d..bb6d1fe8c 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -949,7 +949,6 @@ float NOTIF_CPID_COUNT; .string nent_string; // networked notification values -.entity nent_realent; .float nent_broadcast; .entity nent_client; .float nent_net_type; -- 2.39.2