From: Samual Lenks Date: Mon, 4 Mar 2013 20:59:02 +0000 (-0500) Subject: Use MakeConsoleSafe for the message debugs instead X-Git-Tag: xonotic-v0.7.0~62^2~23^2~7 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=5bce0e4faddd0fd2760415115ff0f8b5358e3c20;p=xonotic%2Fxonotic-data.pk3dir.git Use MakeConsoleSafe for the message debugs instead --- diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 7cdbeb093..054e19c95 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -736,9 +736,9 @@ string Local_Notification_sprintf( #ifdef NOTIFICATIONS_DEBUG dprint(sprintf( "Local_Notification_sprintf('%s^7', '%s', %s, %s);\n", - strreplace("\n", "\\n", input), + MakeConsoleSafe(input), args, - strreplace("\n", "\\n", sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)), + MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)), sprintf("%d, %d, %d, %d", f1, f2, f3, f4) )); #endif @@ -802,8 +802,8 @@ void Local_Notification_HUD_Notify_Push( "Local_Notification_HUD_Notify_Push('%s^7', '%s', %s, %s);\n", icon, hudargs, - strreplace("\n", "\\n", sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)), - strreplace("\n", "\\n", sprintf("'%s^7', '%s^7'", stof(arg_slot[0]), stof(arg_slot[1]))) + MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)), + MakeConsoleSafe(sprintf("'%s^7', '%s^7'", stof(arg_slot[0]), stof(arg_slot[1]))) )); #endif HUD_Notify_Push(icon, arg_slot[0], arg_slot[1]); @@ -840,7 +840,7 @@ void Local_Notification_centerprint_generic( #ifdef NOTIFICATIONS_DEBUG dprint(sprintf( "Local_Notification_centerprint_generic('%s^7', '%s', %d, %d, %d, %d);\n", - strreplace("\n", "\\n", input), + MakeConsoleSafe(input), durcnt, f1, f2, stof(arg_slot[0]), stof(arg_slot[1]) @@ -912,7 +912,7 @@ void Local_Notification(float net_type, float net_name, ...count) "Local_Notification(%s, %s, %s, %s);\n", Get_Notif_TypeName(net_type), notif.nent_name, - strreplace("\n", "\\n", sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)), + MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)), sprintf("%d, %d, %d, %d", f1, f2, f3, f4) )); #endif @@ -1336,7 +1336,7 @@ void Send_Notification( broadcast, Get_Notif_TypeName(net_type), notif.nent_name, - strreplace("\n", "\\n", sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)), + MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)), sprintf("%d, %d, %d, %d", f1, f2, f3, f4) )); #endif @@ -1388,13 +1388,12 @@ void Send_Notification_WOVA( #ifdef NOTIFICATIONS_DEBUG dprint(sprintf( - "Send_Notification_WOVA(%d, %s, %s, %s, %s - %d %d);\n", + "Send_Notification_WOVA(%d, %s, %s, %s, %s);\n", broadcast, Get_Notif_TypeName(net_type), notif.nent_name, - sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4), - sprintf("%d, %d, %d, %d", f1, f2, f3, f4), - notif.nent_stringcount, notif.nent_floatcount + MakeConsoleSafe(sprintf("'%s^7', '%s^7', '%s^7', '%s^7'", s1, s2, s3, s4)), + sprintf("%d, %d, %d, %d", f1, f2, f3, f4) )); #endif