From: Samual Lenks Date: Mon, 25 Feb 2013 22:13:19 +0000 (-0500) Subject: Add some more debug info, trying to hunt down an annoying bug X-Git-Tag: xonotic-v0.7.0~62^2~23^2~112 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=b4d59adc72e46196fde31d43a74e8b2035a0aaed;p=xonotic%2Fxonotic-data.pk3dir.git Add some more debug info, trying to hunt down an annoying bug --- diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index b25dde7bd..30d91adf7 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -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 diff --git a/qcsrc/server/g_damage.qc b/qcsrc/server/g_damage.qc index dee1f9d4b..35b701cec 100644 --- a/qcsrc/server/g_damage.qc +++ b/qcsrc/server/g_damage.qc @@ -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;