#include "announcer.qh"
+#include "mutators/events.qh"
+
#include "../common/notifications.qh"
#include "../common/stats.qh"
bool announcer_1min;
bool announcer_5min;
+string AnnouncerOption()
+{
+ if(MUTATOR_CALLHOOK(AnnouncerOption, ret_string))
+ return ret_string;
+
+ return autocvar_cl_announcer;
+}
+
void Announcer_Countdown()
{
SELFPARAM();
g_trueaim_minrange = ReadCoord();
g_balance_porto_secondary = ReadByte();
+ MUTATOR_CALLHOOK(Ent_Init);
+
if(!postinit)
PostInit();
}
/**/
MUTATOR_HOOKABLE(WantEventchase, EV_WantEventchase);
+#define EV_AnnouncerOption(i, o) \
+ /**/ i(string, ret_string) \
+ /**/ o(string, ret_string) \
+ /**/
+MUTATOR_HOOKABLE(AnnouncerOption, EV_AnnouncerOption);
+
+MUTATOR_HOOKABLE(Ent_Init, EV_NO_ARGS);
#endif
{
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,
WriteByte(MSG_ENTITY, WEP_CVAR_SEC(hagar, load_max)); // hagar max loadable rockets // WEAPONTODO
WriteCoord(MSG_ENTITY, autocvar_g_trueaim_minrange);
WriteByte(MSG_ENTITY, WEP_CVAR(porto, secondary)); // WEAPONTODO
+
+ MUTATOR_CALLHOOK(Ent_Init);
return true;
}
/**/ i(entity, __self) \
/**/
MUTATOR_HOOKABLE(TurretThink, EV_TurretThink);
+
+MUTATOR_HOOKABLE(Ent_Init, EV_NO_ARGS);
#endif