]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Various fixes/cleanups
authorSamual Lenks <samual@xonotic.org>
Sat, 9 Feb 2013 00:37:49 +0000 (19:37 -0500)
committerSamual Lenks <samual@xonotic.org>
Sat, 9 Feb 2013 00:37:49 +0000 (19:37 -0500)
qcsrc/common/notifications.qc
qcsrc/common/notifications.qh
qcsrc/server/cl_client.qc

index fdd93459ab8dac2a34fc4b6aead93d73581372a8..1fb583a24c9eaa60ae17053af7638aa0b235b07a 100644 (file)
@@ -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));
                }
index b619885ef3af81148feb60a0f65e23af8dd6e71d..483b2f19a4705d9e4191ebee58893227bd5f4d0c 100644 (file)
@@ -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
index 7e768741bbe747a317ae0b181ed3b69470335505..24ac5498bd58e9cf63a1445bc9ab795961304bb2 100644 (file)
@@ -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;
        }