]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
debug print updates
authorSamual Lenks <samual@xonotic.org>
Wed, 27 Feb 2013 05:07:05 +0000 (00:07 -0500)
committerSamual Lenks <samual@xonotic.org>
Wed, 27 Feb 2013 05:07:05 +0000 (00:07 -0500)
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh

index bc346965af44b540b029e7e4d838c686240b4f69..33b7ba528f0e128e4ab9a4debbd0d2dc15f6570a 100644 (file)
@@ -317,8 +317,11 @@ void Local_Notification(float net_type, float net_name, ...count)
 
        entity notif = Get_Notif_Ent(net_type, net_name);
        if not(notif) { backtrace("Local_Notification: Could not find notification entity!\n"); return; }
-       if not(notif.nent_enabled) { dprint(sprintf("Local_Notification(%s, %s): Entity was disabled...\n", Get_Notif_TypeName(net_type), notif.nent_name)); return; }
 
+       #ifdef NOTIFICATIONS_DEBUG
+       if not(notif.nent_enabled) { dprint(sprintf("Local_Notification(%s, %s): Entity was disabled...\n", Get_Notif_TypeName(net_type), notif.nent_name)); return; }
+       #endif
+       
        if((notif.nent_stringcount + notif.nent_floatcount) > count)
        {
                backtrace(sprintf(
@@ -466,7 +469,7 @@ void Read_Notification(float is_new)
                        else
                        {
                                entity notif = Get_Notif_Ent(MSG_CENTER, net_name);
-                               if not(notif) { print("Read_Notification: Could not find notification entity!\n"); return; }
+                               if not(notif) { backtrace("Read_Notification: Could not find notification entity!\n"); return; }
                                centerprint_generic(notif.nent_cpid, "", 0, 0);
                        }
                }
@@ -474,7 +477,7 @@ void Read_Notification(float is_new)
        else
        {
                entity notif = Get_Notif_Ent(net_type, net_name);
-               if not(notif) { print("Read_Notification: Could not find notification entity!\n"); return; }
+               if not(notif) { backtrace("Read_Notification: Could not find notification entity!\n"); return; }
 
                #ifdef NOTIFICATIONS_DEBUG
                dprint(sprintf("Read_Notification(%d) at %f: net_type = %s, net_name = %s\n", is_new, time, Get_Notif_TypeName(net_type), notif.nent_name));
@@ -630,8 +633,10 @@ void Kill_Notification(float broadcast, entity client, float net_type, float net
                                { if(notif.nent_net_name == net_name) { notif.think(); } }
                        else
                                { notif.think(); }
-                               
+
+                       #ifdef NOTIFICATIONS_DEBUG
                        print(sprintf("killed '%s'\n", notif.classname));
+                       #endif
                }
        }
 }
index a6653ecbac17eaa564ec5af42b1394e91610e933..91bef5fba450f18f8a15593e988b5d9040e4aee1 100644 (file)
@@ -1026,7 +1026,6 @@ string Process_Notif_Args(float arg_type, string args, string notiftype, string
                \
                notif.nent_stringcount = strnum; \
                notif.nent_floatcount = flnum; \
-               if(strnum + flnum > 4) { print(sprintf("^1NOTIFICATION HAS TOO MANY ARGUMENTS FOR BROKEN VARARGS: ^7net_type = MSG_%s, net_name = %s\n", strtoupper(#type), #name)); } \
                if(strnum + flnum) \
                { \
                        if(args != "") { notif.nent_args = strzone(Process_Notif_Args(1, args, strtoupper(#type), #name)); } \