]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use Kill_Notification for minstanex too, plus rip out other legacy CPIDs
authorSamual Lenks <samual@xonotic.org>
Wed, 27 Feb 2013 04:47:51 +0000 (23:47 -0500)
committerSamual Lenks <samual@xonotic.org>
Wed, 27 Feb 2013 04:47:51 +0000 (23:47 -0500)
qcsrc/common/constants.qh
qcsrc/common/notifications.qh
qcsrc/server/cl_client.qc
qcsrc/server/command/cmd.qc
qcsrc/server/w_minstanex.qc

index e60b0975afc5d76dcd425bbe25c5ccc54a29bb5d..6f50a08a5586404152917203bd874a3ea1e1a398 100644 (file)
@@ -377,10 +377,6 @@ float WATERLEVEL_SUBMERGED = 3;
 
 float MAX_SHOT_DISTANCE = 32768;
 
-//centerprint ID list
-float CPID_MOTD = 9;
-float CPID_KH_MSG = 10;
-
 // weapon requests
 float WR_SETUP         = 1; // (SVQC) setup weapon data
 float WR_THINK         = 2; // (SVQC) logic to run every frame
index 9529720028d9981198d5f0f85f7225de76f6d22e..a6653ecbac17eaa564ec5af42b1394e91610e933 100644 (file)
@@ -60,8 +60,12 @@ void Read_Notification(float is_new);
 void Kill_Notification(float broadcast, entity client, float net_type, float net_name);
 void Send_Notification(float broadcast, entity client, float net_type, float net_name, ...count);
 void Send_Notification_WOVA(float broadcast, entity client, float net_type, float net_name, string s1, string s2, string s3, string s4, float f1, float f2, float f3, float f4);
+
+// legacy stuff
 void Send_CSQC_Centerprint_Generic(entity e, float id, string s, float duration, float countdown_num);
 #define Send_CSQC_Centerprint_Generic_Expire(e,id) Send_CSQC_Centerprint_Generic(e, id, "", 1, 0)
+float CPID_MOTD = 9;
+float CPID_KH_MSG = 10;
 #endif
 
 
index 277f0dd1638bd8a6855a17d73a6af9aa72c4144c..364e0ffdcb1556c65b5cfe9d5952e38cf0be94eb 100644 (file)
@@ -2362,7 +2362,7 @@ void LeaveSpectatorMode()
                //player may not join because of g_maxplayers is set
                if (time - self.prevent_join_msgtime > 2)
                {
-                       Send_CSQC_Centerprint_Generic(self, CPID_PREVENT_JOIN, PREVENT_JOIN_TEXT, 0, 0);
+                       Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_JOIN_PREVENT);
                        self.prevent_join_msgtime = time;
                }
        }
index 9fe72b829ac4e1e0a2646a633f01f3bdbcb5f074..48886d9b9da925a3c37926dd94c7d0b943aca9c5 100644 (file)
@@ -165,7 +165,7 @@ void ClientCommand_join(float request)
                                        else 
                                        {
                                                //player may not join because of g_maxplayers is set
-                                               centerprint(self, PREVENT_JOIN_TEXT);
+                                               Send_Notification(NOTIF_ONE_ONLY, self, MSG_CENTER, CENTER_JOIN_PREVENT);
                                        }
                                }
                        }
index 5013890bfe3ea5bf5c488c86a15b6b312f329da3..f80c5f6ce1ada2ebe4e0a41a027869a4249f42e7 100644 (file)
@@ -85,7 +85,7 @@ void minstagib_stop_countdown(entity e)
 {
        if (!e.minstagib_needammo)
                return;
-       Send_CSQC_Centerprint_Generic_Expire(e, CPID_MINSTA_FINDAMMO);
+       Kill_Notification(NOTIF_ONE_ONLY, e, MSG_CENTER, CENTER_MINSTA_FINDAMMO);
        e.minstagib_needammo = FALSE;
 }
 void minstagib_ammocheck(void)