From 72150bc9e7bee6d8d1d2cf9d790ce674fd2a607e Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Fri, 8 Feb 2013 19:37:49 -0500 Subject: [PATCH] Various fixes/cleanups --- qcsrc/common/notifications.qc | 2 +- qcsrc/common/notifications.qh | 8 +++++--- qcsrc/server/cl_client.qc | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/qcsrc/common/notifications.qc b/qcsrc/common/notifications.qc index fdd93459a..1fb583a24 100644 --- a/qcsrc/common/notifications.qc +++ b/qcsrc/common/notifications.qc @@ -336,7 +336,7 @@ void Send_Notification(float broadcast, entity client, float net_type, float net Net_LinkEntity(notif, FALSE, 0, Write_Notification); - if(!server_is_local) + if((!server_is_local) && (broadcast == NOTIF_ANY || broadcast == NOTIF_ANY_EXCEPT) && (net_type != MSG_CENTER)) { Local_Notification_Without_VarArgs(net_type, net_name, stringcount, floatcount, IFSTR(0), IFSTR(1), IFSTR(2), IFSTR(3), IFFL(0), IFFL(1), IFFL(2), IFFL(3)); } diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index b619885ef..483b2f19a 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -86,9 +86,6 @@ string got_commandkey; #define WEAPON_NAME f1 // weaponorder[f1].netname #endif -#define ADD_AUTOCVAR(name) var float autocvar_notification_##name = TRUE; -#define CHECK_AUTOCVAR(name) if(autocvar_notification_##name) - #define NOTIF_SWITCH_LIST(net_type,net_name,returnv) \ switch(net_name) \ { \ @@ -583,6 +580,9 @@ void Dump_Notifications(float fh, float alsoprint); #define NOTIF_FIRST 1 #define NOTIF_MAX 1024 // limit of recursive functions with ACCUMULATE_FUNCTION +#define ADD_AUTOCVAR(name) var float autocvar_notification_##name = TRUE; +#define CHECK_AUTOCVAR(name) if(autocvar_notification_##name) + #define CHECK_NOTIFICATION_1(net_type,net_name,check_newline,normal,gentle) \ if((normal == "") || ((normal == "") && (gentle == ""))) { print(strcat("^1EMPTY NOTIFICATION: ^7net_type = ", net_type, ", net_name = ", VAR_TO_TEXT(net_name), ".\n")); } \ #if check_newline \ @@ -662,4 +662,6 @@ MSG_DEATH_NOTIFICATIONS #undef MSG_WEAPON_NOTIF #undef MSG_DEATH_NOTIF +#undef ADD_AUTOCVAR + #endif // ifndef MENUQC diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 7e768741b..24ac5498b 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1375,10 +1375,10 @@ void ClientConnect (void) if(self.netaddress == "local") { - print("^3server is local!\n"); + //print("^3server is local!\n"); if(server_is_local) - print("Multiple local clients???"); + error("Multiple local clients???"); else server_is_local = TRUE; } -- 2.39.2