#endif
string forcefog;
-string cl_announcer_prev;
void WaypointSprite_Load();
void CSQC_Init(void)
{
DamageInfo_Precache();
Vehicles_Precache();
turrets_precache();
-
- if(autocvar_cl_announcer != cl_announcer_prev) {
- Announcer_Precache();
- if(cl_announcer_prev)
- strunzone(cl_announcer_prev);
- cl_announcer_prev = strzone(autocvar_cl_announcer);
- }
+ Announcer_Precache();
Tuba_Precache();
if(autocvar_cl_reticle_item_normal) precache_pic("gfx/reticle_normal");
bHandled = true;
break;
case TE_CSQC_ANNOUNCE:
- announce_snd = strzone(ReadString());
+ Net_Announcer(ReadString());
bHandled = true;
break;
case TE_CSQC_KILLNOTIFY:
PostInit();
if(intermission && !isdemo() && !(calledhooks & HOOK_END))
+ {
if(calledhooks & HOOK_START)
{
localcmd("\ncl_hook_gameend\n");
calledhooks |= HOOK_END;
}
-
+ }
+
Announcer();
fov = autocvar_fov;
-void serverAnnouncer()
+void Net_Announcer(string announce_snd)
{
- // check for pending announcement, play it and remove it
- if(announce_snd != "")
- {
- sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/", announce_snd, ".wav"), VOL_BASEVOICE, ATTN_NONE);
- strunzone(announce_snd);
- announce_snd = "";
- }
+ sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/", announce_snd, ".wav"), VOL_BASEVOICE, ATTN_NONE);
}
/**
void Announcer()
{
CheckForGamestartChange();
- serverAnnouncer();
maptimeAnnouncer();
carrierAnnouncer();
}