]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add some more debug info, trying to hunt down an annoying bug
authorSamual Lenks <samual@xonotic.org>
Mon, 25 Feb 2013 22:13:19 +0000 (17:13 -0500)
committerSamual Lenks <samual@xonotic.org>
Mon, 25 Feb 2013 22:13:19 +0000 (17:13 -0500)
qcsrc/common/notifications.qc
qcsrc/server/g_damage.qc

index b25dde7bd54d27537938a4485651e957bdf5667a..30d91adf74f8579eef6bf318c76e28ad517179e3 100644 (file)
@@ -600,16 +600,23 @@ void Send_Notification(float broadcast, entity client,
                        broadcast, net_type, notif.nent_name, notif.nent_stringcount, notif.nent_floatcount, count));
                return;
        }
-       
+
        #ifdef NOTIFICATIONS_DEBUG
+       string s1 = ((0 < notif.nent_stringcount) ? ...(0, string) : "");
+       string s2 = ((1 < notif.nent_stringcount) ? ...(1, string) : "");
+       string s3 = ((2 < notif.nent_stringcount) ? ...(2, string) : "");
+       string s4 = ((3 < notif.nent_stringcount) ? ...(3, string) : "");
+       float f1 = ((0 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 0), float) : 0);
+       float f2 = ((1 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 1), float) : 0);
+       float f3 = ((2 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 2), float) : 0);
+       float f4 = ((3 < notif.nent_floatcount) ? ...((notif.nent_stringcount + 3), float) : 0);
        dprint(
-               sprintf("Send_Notification(%d, %d, %s, stringcount: %d, floatcount: %d, varargs: %d);\n",
+               sprintf("Send_Notification(%d, %d, %s, %s, %s);\n",
                        broadcast,
                        net_type,
                        notif.nent_name,
-                       notif.nent_stringcount,
-                       notif.nent_floatcount,
-                       count
+                       sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4),
+                       sprintf("%d, %d, %d, %d", f1, f2, f3, f4)
                )
        );
        #endif
index dee1f9d4b51aadade23aa37f08695197fa6d65ec..35b701cec4aa35c01c5441d5e50e43d97e739143 100644 (file)
@@ -308,6 +308,7 @@ float Obituary_WeaponDeath(entity notif_target, float murder, float deathtype, s
 {
        float death_weapon = DEATH_WEAPONOF(deathtype);
 
+       print(sprintf("foobar: '%s' '%s' '%s', %d, %d\n", s1, s2, s3, f1, f2)); 
        if(death_weapon)
        {
                w_deathtype = deathtype;