From 7f1092db1d56caf3aa9fa7aa84a0bbc78c0300da Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Sun, 14 Apr 2013 22:22:08 -0400 Subject: [PATCH] More integration --- qcsrc/common/notifications.qc | 32 +++++++++++++++++++++++++++++++- qcsrc/common/notifications.qh | 22 +++++++++++----------- 2 files changed, 42 insertions(+), 12 deletions(-) diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index 0feda9ba90..bc06af1b98 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -349,7 +349,7 @@ void Create_Notification_Entity( float centername, float channel, string snd, - float volume, + float vol, float position, float strnum, float flnum, @@ -370,6 +370,13 @@ void Create_Notification_Entity( string typestring = ""; switch(typeid) { + case MSG_ANNCE: + { + typestring = "MSG_ANNCE"; + msg_info_notifs[nameid - 1] = notif; + notif.classname = "msg_annce_notification"; + break; + } case MSG_INFO: { typestring = "MSG_INFO"; @@ -455,6 +462,29 @@ void Create_Notification_Entity( notif.nent_floatcount = max(infoname_floatcount, centername_floatcount); } } + else if(typeid == MSG_ANNCE) + { + // Set MSG_ANNCE information and handle precaching + if(snd != "") + { + notif.nent_channel = channel; + notif.nent_snd = strzone(snd); + notif.nent_vol = vol; + notif.nent_position = position; + } + else + { + print(sprintf( + strcat( + "^1NOTIFICATION WITH NO SOUND: ", + "^7net_type = %s, net_name = %s.\n" + ), + typestring, + namestring + )); + notif_error = TRUE; + } + } else { // Set MSG_INFO and MSG_CENTER string/float counts diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index f758cd2d7c..c525bdd0c3 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -50,7 +50,7 @@ void Create_Notification_Entity( float centername, float channel, string snd, - float volume, + float vol, float position, float strnum, float flnum, @@ -1027,7 +1027,7 @@ float NOTIF_CPID_COUNT; .entity nent_msgcenter; .float nent_channel; .string nent_snd; -.float nent_volume; +.float nent_vol; .float nent_position; .float nent_stringcount; .float nent_floatcount; @@ -1063,8 +1063,8 @@ float NOTIF_CPID_COUNT; NO_MSG, /* infoname */ \ NO_MSG, /* centername */ \ channel, /* channel */ \ - sound, /* sound */ \ - volume, /* volume */ \ + sound, /* snd */ \ + volume, /* vol */ \ position, /* position */ \ NO_MSG, /* strnum */ \ NO_MSG, /* flnum */ \ @@ -1075,7 +1075,7 @@ float NOTIF_CPID_COUNT; "", /* durcnt */ \ "", /* normal */ \ "", /* gentle */ \ - TRUE, /* msg_is_info */ \ + FALSE, /* msg_is_info */ \ FALSE); /* msg_is_multi */ \ } \ ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name) @@ -1097,8 +1097,8 @@ float NOTIF_CPID_COUNT; NO_MSG, /* infoname */ \ NO_MSG, /* centername */ \ NO_MSG, /* channel */ \ - "", /* sound */ \ - NO_MSG, /* volume */ \ + "", /* snd */ \ + NO_MSG, /* vol */ \ NO_MSG, /* position */ \ strnum, /* strnum */ \ flnum, /* flnum */ \ @@ -1133,8 +1133,8 @@ float NOTIF_CPID_COUNT; NO_MSG, /* infoname */ \ NO_MSG, /* centername */ \ NO_MSG, /* channel */ \ - "", /* sound */ \ - NO_MSG, /* volume */ \ + "", /* snd */ \ + NO_MSG, /* vol */ \ NO_MSG, /* position */ \ strnum, /* strnum */ \ flnum, /* flnum */ \ @@ -1167,8 +1167,8 @@ float NOTIF_CPID_COUNT; infoname, /* infoname */ \ centername, /* centername */ \ NO_MSG, /* channel */ \ - "", /* sound */ \ - NO_MSG, /* volume */ \ + "", /* snd */ \ + NO_MSG, /* vol */ \ NO_MSG, /* position */ \ NO_MSG, /* strnum */ \ NO_MSG, /* flnum */ \ -- 2.39.2