]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Send one byte less in Send_KillNotification, Send_CSQC_KillCenterprint and Send_CSQC_...
authorterencehill <piuntn@gmail.com>
Sat, 20 Aug 2011 15:53:12 +0000 (17:53 +0200)
committerterencehill <piuntn@gmail.com>
Sat, 20 Aug 2011 15:53:12 +0000 (17:53 +0200)
qcsrc/client/Main.qc
qcsrc/common/constants.qh
qcsrc/server/g_damage.qc
qcsrc/server/miscfunctions.qc

index 0ec9ccd960668cd85b3d6bc80ffe16209321e71e..606123ad1c1d2c2ba4696b3f792bc8eb05a65e89 100644 (file)
@@ -1313,31 +1313,6 @@ void Net_ReadPingPLReport()
        playerslots[e].ping_movementloss = ml / 255.0;
 }
 
-void Net_Notify() {
-       float type;
-       type = ReadByte();
-
-       if(type == CSQC_KILLNOTIFY)
-       {
-               HUD_KillNotify(ReadString(), ReadString(), ReadString(), ReadShort(), ReadByte());
-       }
-       else if(type == CSQC_KILLCENTERPRINT)
-       {
-               HUD_KillCenterprint(ReadString(), ReadString(), ReadShort(), ReadByte());
-       }
-       else if(type == CSQC_CENTERPRINT_GENERIC)
-       {
-               float id;
-               string s;
-               id = ReadByte();
-               s = ReadString();
-               if (id != 0 && s != "")
-                       centerprint_generic(id, s, ReadByte(), ReadByte());
-               else
-                       centerprint_generic(id, s, 0, 0);
-       }
-}
-
 void Net_WeaponComplain() {
        complain_weapon = ReadByte();
 
@@ -1405,8 +1380,23 @@ float CSQC_Parse_TempEntity()
                        announce_snd = strzone(ReadString());
                        bHandled = true;
                        break;
-               case TE_CSQC_NOTIFY:
-                       Net_Notify();
+               case TE_CSQC_KILLNOTIFY:
+                       HUD_KillNotify(ReadString(), ReadString(), ReadString(), ReadShort(), ReadByte());
+                       bHandled = true;
+                       break;
+               case TE_CSQC_KILLCENTERPRINT:
+                       HUD_KillCenterprint(ReadString(), ReadString(), ReadShort(), ReadByte());
+                       bHandled = true;
+                       break;
+               case TE_CSQC_CENTERPRINT_GENERIC:
+                       float id;
+                       string s;
+                       id = ReadByte();
+                       s = ReadString();
+                       if (id != 0 && s != "")
+                               centerprint_generic(id, s, ReadByte(), ReadByte());
+                       else
+                               centerprint_generic(id, s, 0, 0);
                        bHandled = true;
                        break;
                case TE_CSQC_WEAPONCOMPLAIN:
index be7e7cd0adb096ab7b1e91c630fe1ff5c88560e3..3fb1b5b47131e114206845f0fbe5ae45fa7b1d83 100644 (file)
@@ -57,8 +57,10 @@ const float TE_CSQC_TEAMNAGGER = 106;
 const float TE_CSQC_PINGPLREPORT = 107;
 const float TE_CSQC_ANNOUNCE = 110;
 const float TE_CSQC_TARGET_MUSIC = 111;
-const float TE_CSQC_NOTIFY = 112;
-const float TE_CSQC_WEAPONCOMPLAIN = 113;
+const float TE_CSQC_KILLNOTIFY = 112;
+const float TE_CSQC_KILLCENTERPRINT = 113;
+const float TE_CSQC_CENTERPRINT_GENERIC = 114;
+const float TE_CSQC_WEAPONCOMPLAIN = 115;
 const float TE_CSQC_NEX_SCOPE = 116;
 const float TE_CSQC_MINELAYER_MAXMINES = 117;
 const float TE_CSQC_HAGAR_MAXROCKETS = 118;
@@ -79,10 +81,6 @@ const float RACE_NET_SERVER_RANKINGS = 11;
 const float RACE_NET_SERVER_STATUS = 12;
 const float RANKINGS_CNT = 15;
 
-const float CSQC_KILLNOTIFY = 0;
-const float CSQC_KILLCENTERPRINT = 1;
-const float CSQC_CENTERPRINT_GENERIC = 2;
-
 const float ENT_CLIENT = 0;
 const float ENT_CLIENT_DEAD = 1;
 const float ENT_CLIENT_ENTCS = 2;
index 06e52238a63e2572acba0567f13981519ab6bde5..40887ad933c5d61329e18301a41083b253eeae07 100644 (file)
@@ -267,8 +267,7 @@ void LogDeath(string mode, float deathtype, entity killer, entity killed)
 void Send_KillNotification (string s1, string s2, string s3, float msg, float type)
 {
        WriteByte(MSG_ALL, SVC_TEMPENTITY);
-       WriteByte(MSG_ALL, TE_CSQC_NOTIFY);
-       WriteByte(MSG_ALL, CSQC_KILLNOTIFY);
+       WriteByte(MSG_ALL, TE_CSQC_KILLNOTIFY);
        WriteString(MSG_ALL, s1);
        WriteString(MSG_ALL, s2);
        WriteString(MSG_ALL, s3);
@@ -284,8 +283,7 @@ void Send_CSQC_KillCenterprint(entity e, string s1, string s2, float msg, float
                msg_entity = e;
                WRITESPECTATABLE_MSG_ONE({
                        WriteByte(MSG_ONE, SVC_TEMPENTITY);
-                       WriteByte(MSG_ONE, TE_CSQC_NOTIFY);
-                       WriteByte(MSG_ONE, CSQC_KILLCENTERPRINT);
+                       WriteByte(MSG_ONE, TE_CSQC_KILLCENTERPRINT);
                        WriteString(MSG_ONE, s1);
                        WriteString(MSG_ONE, s2);
                        WriteShort(MSG_ONE, msg);
index 09e2dfb05d4b60e64154b00498cc919b3369fc50..a32a8baf2d99f80f0dac980606e324dd67de64ad 100644 (file)
@@ -1672,8 +1672,7 @@ void Send_CSQC_Centerprint_Generic(entity e, float id, string s, float duration,
                msg_entity = e;
                WRITESPECTATABLE_MSG_ONE({
                        WriteByte(MSG_ONE, SVC_TEMPENTITY);
-                       WriteByte(MSG_ONE, TE_CSQC_NOTIFY);
-                       WriteByte(MSG_ONE, CSQC_CENTERPRINT_GENERIC);
+                       WriteByte(MSG_ONE, TE_CSQC_CENTERPRINT_GENERIC);
                        WriteByte(MSG_ONE, id);
                        WriteString(MSG_ONE, s);
                        if (id != 0 && s != "")