float centername,
float channel,
string snd,
- float volume,
+ float vol,
float position,
float strnum,
float flnum,
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";
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
float centername,
float channel,
string snd,
- float volume,
+ float vol,
float position,
float strnum,
float flnum,
.entity nent_msgcenter;
.float nent_channel;
.string nent_snd;
-.float nent_volume;
+.float nent_vol;
.float nent_position;
.float nent_stringcount;
.float nent_floatcount;
NO_MSG, /* infoname */ \
NO_MSG, /* centername */ \
channel, /* channel */ \
- sound, /* sound */ \
- volume, /* volume */ \
+ sound, /* snd */ \
+ volume, /* vol */ \
position, /* position */ \
NO_MSG, /* strnum */ \
NO_MSG, /* flnum */ \
"", /* durcnt */ \
"", /* normal */ \
"", /* gentle */ \
- TRUE, /* msg_is_info */ \
+ FALSE, /* msg_is_info */ \
FALSE); /* msg_is_multi */ \
} \
ACCUMULATE_FUNCTION(RegisterNotifications, RegisterNotification_##name)
NO_MSG, /* infoname */ \
NO_MSG, /* centername */ \
NO_MSG, /* channel */ \
- "", /* sound */ \
- NO_MSG, /* volume */ \
+ "", /* snd */ \
+ NO_MSG, /* vol */ \
NO_MSG, /* position */ \
strnum, /* strnum */ \
flnum, /* flnum */ \
NO_MSG, /* infoname */ \
NO_MSG, /* centername */ \
NO_MSG, /* channel */ \
- "", /* sound */ \
- NO_MSG, /* volume */ \
+ "", /* snd */ \
+ NO_MSG, /* vol */ \
NO_MSG, /* position */ \
strnum, /* strnum */ \
flnum, /* flnum */ \
infoname, /* infoname */ \
centername, /* centername */ \
NO_MSG, /* channel */ \
- "", /* sound */ \
- NO_MSG, /* volume */ \
+ "", /* snd */ \
+ NO_MSG, /* vol */ \
NO_MSG, /* position */ \
NO_MSG, /* strnum */ \
NO_MSG, /* flnum */ \