]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Slight cleanup
authorSamual Lenks <samual@xonotic.org>
Sat, 2 Mar 2013 21:26:30 +0000 (16:26 -0500)
committerSamual Lenks <samual@xonotic.org>
Sat, 2 Mar 2013 21:26:30 +0000 (16:26 -0500)
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh

index bb07c0b7dee2a2e1bcaad561d113e5cbc476dbdb..cc87cb72e07b2fed0d453904b5be4c7bf8ac02c1 100644 (file)
@@ -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;
index 8c594245d0d4f0c2c2dc41478dcb75ba0517f9a9..bb6d1fe8c649dd9682eeae4b24166f3a10c50d1d 100644 (file)
@@ -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;