]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Shit still ain't workin.
authorSamual Lenks <samual@xonotic.org>
Mon, 4 Feb 2013 00:29:55 +0000 (19:29 -0500)
committerSamual Lenks <samual@xonotic.org>
Mon, 4 Feb 2013 00:29:55 +0000 (19:29 -0500)
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh

index 1918eb2ddd121f3af7121fba76e79a51532816dd..1e61db13ac10762ff042482a0ac937bc0f14ac73 100644 (file)
@@ -320,6 +320,8 @@ void Read_Notification(float is_new)
 #ifdef SVQC
 float Write_Notification(entity client, float sf)
 {
+       print("\n\nWrite_Notification():");
+       eprint(self);
        float i, send = FALSE;
        
        switch(self.nent_broadcast)
@@ -334,15 +336,12 @@ float Write_Notification(entity client, float sf)
        }
 
        if(send)
-       {
-               float stringcount = stof(Get_Field_Value(F_STRNUM, self.nent_net_type, self.nent_net_name));
-               float floatcount = stof(Get_Field_Value(F_FLNUM, self.nent_net_type, self.nent_net_name));
-               
+       {               
                WriteByte(MSG_ENTITY, ENT_CLIENT_NOTIFICATION);
                WriteByte(MSG_ENTITY, self.nent_net_type);
                WriteShort(MSG_ENTITY, self.nent_net_name);
-               for(i = 0; i < stringcount; ++i) { WriteString(MSG_ENTITY, self.nent_strings[i]); } 
-               for(i = 0; i < floatcount; ++i) { WriteLong(MSG_ENTITY, self.nent_floats[stringcount + i]); }
+               for(i = 0; i < self.nent_stringcount; ++i) { WriteString(MSG_ENTITY, self.nent_strings[i]); } 
+               for(i = 0; i < self.nent_floatcount; ++i) { WriteLong(MSG_ENTITY, self.nent_floats[i]); }
        }
 
        return send; 
@@ -368,9 +367,14 @@ void Send_Notification(float broadcast, entity client, float net_type, float net
                notif.nent_client = client;
                notif.nent_net_type = net_type;
                notif.nent_net_name = net_name;
+               notif.nent_stringcount = stringcount;
+               notif.nent_floatcount = floatcount; 
                for(i = 0; i < stringcount; ++i) { tmp_s = ...(i, string); notif.nent_strings[i] = tmp_s; dprint("WriteString(...(", ftos(i), ", string)); - ", tmp_s, "\n"); } 
                for(i = 0; i < floatcount; ++i) { tmp_f = ...((stringcount + i), float); notif.nent_floats[i] = tmp_f; dprint("WriteLong(...(", ftos((stringcount + i)), ", float)); - ", ftos(tmp_f), "\n"); }
 
+               print("\n\nSend_Notification():");
+               eprint(notif);
+
                Net_LinkEntity(notif, FALSE, 0.5, Write_Notification);
 
                if(!server_is_local)
index b94c21a05a0874ba4bbdd3a97a45ebe338e30428..b0d75fa8f4d88e9c0bc95b38e73ecb4efef9b815 100644 (file)
@@ -133,6 +133,8 @@ void Read_Notification(float is_new);
 .entity nent_client;
 .float nent_net_type;
 .float nent_net_name;
+.float nent_stringcount;
+.float nent_floatcount; 
 .string nent_strings[4];
 .float nent_floats[4];