From: Samual Lenks Date: Sat, 15 Dec 2012 11:11:56 +0000 (-0500) Subject: also force a check to see if there is even a string for info messages X-Git-Tag: xonotic-v0.7.0~62^2~23^2~331 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e21f8265cbdefc02b31ba3638ac7e30c19a875dd;p=xonotic%2Fxonotic-data.pk3dir.git also force a check to see if there is even a string for info messages --- diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index ba9b49ab9..fe1aadce2 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -511,6 +511,12 @@ string normal_or_gentle(string normal, string gentle) #endif } +float notif_checkstring(string input) +{ + if not(input == "") { return TRUE; } + else { return FALSE; } +} + float notif_stringcount(string s1, string s2) { float stringcount; @@ -677,7 +683,7 @@ void Local_Notification(float net_type, float net_name, string s1, string s2, fl #define MSG_INFO_NOTIF(name,strnum,flnum,args,hudargs,icon,normal,gentle) \ { NOTIF_MATCH(name, net_name) CHECK_AUTOCVAR(name) \ { \ - print(sprintf(CCR(normal_or_gentle(normal, gentle)), args)); \ + if(notif_checkstring(normal)) { print(sprintf(CCR(normal_or_gentle(normal, gentle)), args)); } \ if(strtolower(icon) != "") { HUD_Notify_Push(icon, hudargs); } \ } } MSG_INFO_NOTIFICATIONS