From 1a1b8d4a7d269968585880008a1ce1a32b947ed8 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Sun, 3 Feb 2013 19:29:55 -0500 Subject: [PATCH] Shit still ain't workin. --- qcsrc/common/notifications.qc | 16 ++++++++++------ qcsrc/common/notifications.qh | 2 ++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 1918eb2dd..1e61db13a 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -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) diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index b94c21a05..b0d75fa8f 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -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]; -- 2.39.2