]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Going to sleep for now... just committing progress in the meanwhile
authorSamual Lenks <samual@xonotic.org>
Wed, 26 Sep 2012 04:29:53 +0000 (00:29 -0400)
committerSamual Lenks <samual@xonotic.org>
Wed, 26 Sep 2012 04:29:53 +0000 (00:29 -0400)
qcsrc/client/Main.qc
qcsrc/common/notifications.qc
qcsrc/server/g_damage.qc

index 4d6be4c599240beb5df6b79ba80f0976325a5d3b..14b31947c8ded095f331c74cab18a99ec5360621 100644 (file)
@@ -1188,7 +1188,7 @@ float CSQC_Parse_TempEntity()
                        bHandled = true;
                        break;
                case TE_CSQC_NOTIFICATION:
-                       Local_Notification(ReadByte(), ReadCoord(), ReadString(), ReadString(), ReadString());
+                       Local_Notification(ReadShort(), ReadCoord(), ReadString(), ReadString(), ReadString());
                        bHandled = true;
                        break;
                default:
index cd0bf5fff54436e276d5424e33eb47756b4db577..1d22144b161f68f28f2919afaf11359cef4e03f7 100644 (file)
@@ -222,7 +222,7 @@ void Send_Notification(float net_type, entity client, float net_name, string s1,
                        WRITESPECTATABLE_MSG_ONE({
                                WriteByte(MSG_ONE, SVC_TEMPENTITY);
                                WriteByte(MSG_ONE, TE_CSQC_NOTIFICATION);
-                               WriteByte(MSG_ONE, net_type);
+                               WriteShort(MSG_ONE, net_type);
                                WriteCoord(MSG_ONE, net_name);
                                WriteString(MSG_ONE, s1);
                                WriteString(MSG_ONE, s2);
@@ -281,6 +281,34 @@ void Send_Notification_ToAll(entity except, float spectators, float net_type, fl
 }
 
 // LEGACY NOTIFICATION SYSTEMS
+void Send_KillNotification (string s1, string s2, string s3, float msg, float type)
+{
+       WriteByte(MSG_ALL, SVC_TEMPENTITY);
+       WriteByte(MSG_ALL, TE_CSQC_KILLNOTIFY);
+       WriteString(MSG_ALL, s1);
+       WriteString(MSG_ALL, s2);
+       WriteString(MSG_ALL, s3);
+       WriteShort(MSG_ALL, msg);
+       WriteByte(MSG_ALL, type);
+}
+
+// Function is used to send a generic centerprint whose content CSQC gets to decide (gentle version or not in the below cases)
+void Send_CSQC_KillCenterprint(entity e, string s1, string s2, float msg, float type)
+{
+       if (clienttype(e) == CLIENTTYPE_REAL)
+       {
+               msg_entity = e;
+               WRITESPECTATABLE_MSG_ONE({
+                       WriteByte(MSG_ONE, SVC_TEMPENTITY);
+                       WriteByte(MSG_ONE, TE_CSQC_KILLCENTERPRINT);
+                       WriteString(MSG_ONE, s1);
+                       WriteString(MSG_ONE, s2);
+                       WriteShort(MSG_ONE, msg);
+                       WriteByte(MSG_ONE, type);
+               });
+       }
+}
+
 void Send_CSQC_Centerprint_Generic(entity e, float id, string s, float duration, float countdown_num)
 {
        if ((clienttype(e) == CLIENTTYPE_REAL) && (e.flags & FL_CLIENT))
index d2cc61db3346cb3405ca086e9d025657fd2a4c6f..592bf4653004a699408ca516522229c659ad3ba2 100644 (file)
@@ -308,31 +308,21 @@ void LogDeath(string mode, float deathtype, entity killer, entity killed)
        GameLogEcho(s);
 }
 
-void Send_KillNotification (string s1, string s2, string s3, float msg, float type)
+void Obituary_Notification(string s1, string s2, float deathtype)
 {
-       WriteByte(MSG_ALL, SVC_TEMPENTITY);
-       WriteByte(MSG_ALL, TE_CSQC_KILLNOTIFY);
-       WriteString(MSG_ALL, s1);
-       WriteString(MSG_ALL, s2);
-       WriteString(MSG_ALL, s3);
-       WriteShort(MSG_ALL, msg);
-       WriteByte(MSG_ALL, type);
-}
-
-// Function is used to send a generic centerprint whose content CSQC gets to decide (gentle version or not in the below cases)
-void Send_CSQC_KillCenterprint(entity e, string s1, string s2, float msg, float type)
-{
-       if (clienttype(e) == CLIENTTYPE_REAL)
+       switch(deathtype)
        {
-               msg_entity = e;
-               WRITESPECTATABLE_MSG_ONE({
-                       WriteByte(MSG_ONE, SVC_TEMPENTITY);
-                       WriteByte(MSG_ONE, TE_CSQC_KILLCENTERPRINT);
-                       WriteString(MSG_ONE, s1);
-                       WriteString(MSG_ONE, s2);
-                       WriteShort(MSG_ONE, msg);
-                       WriteByte(MSG_ONE, type);
-               });
+               case DEATH_AUTOTEAMCHANGE:
+               case DEATH_CAMP:
+               case DEATH_NOAMMO:
+               case DEATH_ROT:
+               case DEATH_TEAMCHANGE:
+
+               case KILL_TEAM_RED
+               
+               case DEATH_QUIET:
+               default:
+                       break;
        }
 }