From b4a452a82b2c6d694cdf77bbdac75f27cf8a1133 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Tue, 26 Feb 2013 23:47:51 -0500 Subject: [PATCH] Use Kill_Notification for minstanex too, plus rip out other legacy CPIDs --- qcsrc/common/constants.qh | 4 ---- qcsrc/common/notifications.qh | 4 ++++ qcsrc/server/cl_client.qc | 2 +- qcsrc/server/command/cmd.qc | 2 +- qcsrc/server/w_minstanex.qc | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/qcsrc/common/constants.qh b/qcsrc/common/constants.qh index e60b0975a..6f50a08a5 100644 --- a/qcsrc/common/constants.qh +++ b/qcsrc/common/constants.qh @@ -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 diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 952972002..a6653ecba 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -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 diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 277f0dd16..364e0ffdc 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -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; } } diff --git a/qcsrc/server/command/cmd.qc b/qcsrc/server/command/cmd.qc index 9fe72b829..48886d9b9 100644 --- a/qcsrc/server/command/cmd.qc +++ b/qcsrc/server/command/cmd.qc @@ -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); } } } diff --git a/qcsrc/server/w_minstanex.qc b/qcsrc/server/w_minstanex.qc index 5013890bf..f80c5f6ce 100644 --- a/qcsrc/server/w_minstanex.qc +++ b/qcsrc/server/w_minstanex.qc @@ -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) -- 2.39.2