From: Samual Lenks Date: Sun, 21 Apr 2013 15:43:16 +0000 (-0400) Subject: Make the legacy announcer code useless/strip most of it out X-Git-Tag: xonotic-v0.7.0~73^2~3^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e1ea9a2cfb72063bac70e1f8280cc5e84a2e01ad;p=xonotic%2Fxonotic-data.pk3dir.git Make the legacy announcer code useless/strip most of it out --- diff --git a/qcsrc/client/Main.qc b/qcsrc/client/Main.qc index 173a93194..ecc2000d7 100644 --- a/qcsrc/client/Main.qc +++ b/qcsrc/client/Main.qc @@ -179,7 +179,6 @@ void CSQC_Init(void) DamageInfo_Precache(); Vehicles_Precache(); turrets_precache(); - Announcer_Precache(); Tuba_Precache(); CSQCPlayer_Precache(); @@ -1207,10 +1206,6 @@ float CSQC_Parse_TempEntity() Net_ReadPingPLReport(); bHandled = true; break; - case TE_CSQC_ANNOUNCE: - Announcer_Play(ReadString()); - bHandled = true; - break; case TE_CSQC_WEAPONCOMPLAIN: Net_WeaponComplain(); bHandled = true; diff --git a/qcsrc/client/announcer.qc b/qcsrc/client/announcer.qc index 9bbbbb967..0409aea8b 100644 --- a/qcsrc/client/announcer.qc +++ b/qcsrc/client/announcer.qc @@ -1,14 +1,6 @@ -float previous_announcement_time; -float previous_game_starttime; -string previous_announcement; - -// remaining maptime announcer sounds, true when sound was already played -float announcer_1min; -float announcer_5min; - void Announcer_Play(string announcement) { - if((announcement != previous_announcement) || (time >= (previous_announcement_time + autocvar_cl_announcer_antispam))) + /*if((announcement != previous_announcement) || (time >= (previous_announcement_time + autocvar_cl_announcer_antispam))) { sound(world, CH_INFO, strcat("announcer/", autocvar_cl_announcer, "/", announcement, ".wav"), VOL_BASEVOICE, ATTN_NONE); @@ -16,9 +8,11 @@ void Announcer_Play(string announcement) previous_announcement = strzone(announcement); previous_announcement_time = time; - } + }*/ } +float announcer_1min; +float announcer_5min; void Announcer_Countdown() { float starttime = getstatf(STAT_GAMESTARTTIME); @@ -54,6 +48,7 @@ void Announcer_Countdown() * timelimit, fraglimit and game_starttime! Requires engine changes (remove STAT_TIMELIMIT * and STAT_FRAGLIMIT to be auto-sent) */ + float previous_game_starttime; void Announcer_Gamestart() { float startTime = getstatf(STAT_GAMESTARTTIME); @@ -139,8 +134,3 @@ void Announcer() Announcer_Gamestart(); Announcer_Time(); } - -void Announcer_Precache () -{ - // NOTHING -} diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index c25fb059f..ffec62095 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -36,14 +36,13 @@ const float TE_CSQC_NEXGUNBEAMPARTICLE = 104; const float TE_CSQC_LIGHTNINGARC = 105; const float TE_CSQC_TEAMNAGGER = 106; const float TE_CSQC_PINGPLREPORT = 107; -const float TE_CSQC_ANNOUNCE = 108; -const float TE_CSQC_TARGET_MUSIC = 109; -const float TE_CSQC_WEAPONCOMPLAIN = 110; -const float TE_CSQC_NEX_SCOPE = 111; -const float TE_CSQC_MINELAYER_MAXMINES = 112; -const float TE_CSQC_HAGAR_MAXROCKETS = 113; -const float TE_CSQC_VEHICLESETUP = 114; -const float TE_CSQC_SVNOTICE = 115; +const float TE_CSQC_TARGET_MUSIC = 108; +const float TE_CSQC_WEAPONCOMPLAIN = 109; +const float TE_CSQC_NEX_SCOPE = 110; +const float TE_CSQC_MINELAYER_MAXMINES = 111; +const float TE_CSQC_HAGAR_MAXROCKETS = 112; +const float TE_CSQC_VEHICLESETUP = 113; +const float TE_CSQC_SVNOTICE = 114; const float RACE_NET_CHECKPOINT_HIT_QUALIFYING = 0; // byte checkpoint, short time, short recordtime, string recordholder const float RACE_NET_CHECKPOINT_CLEAR = 1; diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 5322371f9..a13ca51b9 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -7,14 +7,9 @@ void send_CSQC_teamnagger() { } -void AnnounceTo(entity e, string snd) { - if (clienttype(e) == CLIENTTYPE_REAL) - { - msg_entity = e; - WriteByte(MSG_ONE, SVC_TEMPENTITY); - WriteByte(MSG_ONE, TE_CSQC_ANNOUNCE); - WriteString(MSG_ONE, snd); - } +void AnnounceTo(entity e, string snd) +{ + // foobar } float ClientData_Send(entity to, float sf)