#if defined(CSQC)
+ #include "../client/announcer.qh"
#elif defined(MENUQC)
#elif defined(SVQC)
- #include "../dpdefs/progsdefs.qh"
- #include "../dpdefs/dpextensions.qh"
#include "constants.qh"
#include "teams.qh"
#include "../server/autocvars.qh"
#include "../server/constants.qh"
#include "../server/defs.qh"
#include "notifications.qh"
- #include "../server/mutators/mutators_include.qh"
+ #include "../server/mutators/all.qh"
#endif
// ================================================
// Global Entity Setup
// =====================
entity notif = spawn();
+ make_pure(notif);
switch(typeId)
{
case MSG_ANNCE:
{
if(notif.nent_enabled)
{
- precache_sound(sprintf("announcer/%s/%s.wav", autocvar_cl_announcer, snd));
+ precache_sound(sprintf("announcer/%s/%s.wav", AnnouncerOption(), snd));
notif.nent_channel = channel;
notif.nent_snd = strzone(snd);
notif.nent_vol = vol;
soundchannel,
sprintf(
"announcer/%s/%s.wav",
- autocvar_cl_announcer,
+ AnnouncerOption(),
soundfile
),
soundvolume,
soundchannel,
sprintf(
"announcer/%s/%s.wav",
- autocvar_cl_announcer,
+ AnnouncerOption(),
soundfile
),
soundvolume,
soundchannel,
sprintf(
"announcer/%s/%s.wav",
- autocvar_cl_announcer,
+ AnnouncerOption(),
soundfile
),
soundvolume,
remove(self);
}
-float Net_Write_Notification(entity client, int sf)
-{SELFPARAM();
+bool Net_Write_Notification(entity this, entity client, int sf)
+{
if(Notification_ShouldSend(self.nent_broadcast, client, self.nent_client))
{
WriteByte(MSG_ENTITY, ENT_CLIENT_NOTIFICATION);
if(killed_cpid != NO_CPID)
{
- net_notif = spawn();
- net_notif.classname = "net_kill_notification";
+ net_notif = new(net_kill_notification);
+ make_pure(net_notif);
net_notif.nent_broadcast = broadcast;
net_notif.nent_client = client;
net_notif.nent_net_type = MSG_CENTER_CPID;
}
else
{
- entity net_notif = spawn();
+ entity net_notif = new(net_notification);
+ make_pure(net_notif);
net_notif.owner = notif;
- net_notif.classname = "net_notification";
net_notif.nent_broadcast = broadcast;
net_notif.nent_client = client;
net_notif.nent_net_type = net_type;