From 40d3dff9c9b533210612d5d230e181b4c32b7d2f Mon Sep 17 00:00:00 2001
From: Samual Lenks <samual@xonotic.org>
Date: Wed, 27 Feb 2013 00:07:05 -0500
Subject: [PATCH] debug print updates

---
 qcsrc/common/notifications.qc | 13 +++++++++----
 qcsrc/common/notifications.qh |  1 -
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc
index bc346965af..33b7ba528f 100644
--- a/qcsrc/common/notifications.qc
+++ b/qcsrc/common/notifications.qc
@@ -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
 		}
 	}
 }
diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh
index a6653ecbac..91bef5fba4 100644
--- a/qcsrc/common/notifications.qh
+++ b/qcsrc/common/notifications.qh
@@ -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)); } \
-- 
2.39.5