]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Make the legacy announcer code useless/strip most of it out
authorSamual Lenks <samual@xonotic.org>
Sun, 21 Apr 2013 15:43:16 +0000 (11:43 -0400)
committerSamual Lenks <samual@xonotic.org>
Sun, 21 Apr 2013 15:43:16 +0000 (11:43 -0400)
qcsrc/client/Main.qc
qcsrc/client/announcer.qc
qcsrc/common/constants.qh
qcsrc/server/cl_client.qc

index 173a93194bcacf0a17d676f88ced5ee5eed1bab6..ecc2000d7ccae32447fa4e78e75460a26e8f1f5a 100644 (file)
@@ -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;
index 9bbbbb96787c2b6a4fedb16582cb40b550f170ff..0409aea8bcdee9ca80b59562ba10ef1ae742e2d0 100644 (file)
@@ -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
-}
index c25fb059f6ebc2d52b017541eeb39e084ab4166b..ffec62095b9b9466ffcf5db66a75251f254a18f5 100644 (file)
@@ -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;
index 5322371f9b605fe4052bfa56b327e7a655dbfb74..a13ca51b9142c1c469cd8ddb7092b12515419fb4 100644 (file)
@@ -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)