]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
THERE CAN ONLY BE ONE!
authorSamual Lenks <samual@xonotic.org>
Tue, 26 Feb 2013 18:00:06 +0000 (13:00 -0500)
committerSamual Lenks <samual@xonotic.org>
Tue, 26 Feb 2013 18:00:06 +0000 (13:00 -0500)
qcsrc/common/notifications.qc
qcsrc/common/util.qc
qcsrc/common/util.qh
qcsrc/server/defs.qh
qcsrc/server/g_world.qc
qcsrc/server/miscfunctions.qc
qcsrc/server/mutators/gamemode_ctf.qc

index ffd82cfa88193a2fded83aa6f7faa455b0d3d056..8f60424d3af6a2cbb5f0d985248a2fa2caafa0ac 100644 (file)
@@ -639,7 +639,7 @@ void Send_Notification(float broadcast, entity client,
 
        Net_LinkEntity(net_notif, FALSE, 0, Net_Write_Notification);
 
-       if((!server_is_local) && (broadcast == NOTIF_ANY || broadcast == NOTIF_ANY_EXCEPT) && (net_type != MSG_CENTER))
+       if(server_is_dedicated && (broadcast == NOTIF_ANY || broadcast == NOTIF_ANY_EXCEPT) && (net_type != MSG_CENTER))
        {
                Local_Notification_WOVA(
                        net_type, net_name,
index 390321c4e49fefb6971f236408979396f085d4a6..10b76ba95639657d39e8c9f338c45a6866a52200 100644 (file)
@@ -2707,3 +2707,10 @@ string process_time(string fields, float seconds)
        }*/
        return "";
 }
+
+#ifdef SVQC
+void dedicated_print(string input) // print(), but only print if the server is not local
+{
+       if(server_is_dedicated) { print(input); }
+}
+#endif
index 11b2506d5052db1d6b931fc22fcc04fb1c5ca199..d2b63f7ba2c5c858b704c8da847bc9d759d14cd0 100644 (file)
@@ -445,3 +445,7 @@ string count_ordinal(float interval);
 string count_fill(float interval, string zeroth, string first, string second, string third, string multi);
 
 string process_time(string fields, float seconds);
+
+#ifdef SVQC
+void dedicated_print(string input);
+#endif
index 25f00a73997ab5091e428457a66e2902fa8dde38..84be80de4cfad9e6146ecf7f6a10d3e0aaf6b841 100644 (file)
@@ -57,9 +57,8 @@ float team1_score, team2_score, team3_score, team4_score;
 
 float maxclients;
 
-// flags set on worldspawn so that the code knows if it is dedicated or not
+// flag set on worldspawn so that the code knows if it is dedicated or not
 float server_is_dedicated; 
-float server_is_local; 
 
 // Fields
 
index 8ff2ac8a572a001390799dcffed8ae6ee32adb72..5b91f905c8a69d55f7a8273fe40591d9c8ac72da 100644 (file)
@@ -597,16 +597,7 @@ void spawnfunc_worldspawn (void)
                head = nextent(head);
        }
 
-       if(cvar_defstring("is_dedicated"))
-       {
-               server_is_dedicated = TRUE;
-               server_is_local = FALSE;
-       }
-       else
-       {
-               server_is_dedicated = FALSE;
-               server_is_local = TRUE;
-       }
+       server_is_dedicated = (cvar_defstring("is_dedicated") ? TRUE : FALSE);
 
        // needs to be done so early because of the constants they create
        CALL_ACCUMULATED_FUNCTION(RegisterWeapons);
index 1fd1aa1d16f0753ec0ab5d3b7f4729c15b3f3a3b..fd7020f44377fc355d8dc5a77e04b33c862cbda8 100644 (file)
@@ -2631,8 +2631,3 @@ float isPushable(entity e)
                return TRUE;
        return FALSE;
 }
-
-void dedicated_print(string input) // print(), but only print if the server is not local
-{
-       if not(server_is_local) { print(input); }
-}
index 4ede871caf730e94c0dd227ab4322748f7a8acc1..fae2284fa888702a3fa68bf0802fbb1dd2be4cd0 100644 (file)
@@ -39,8 +39,8 @@ void ctf_CaptureRecord(entity flag, entity player)
                else { Send_Notification(NOTIF_ONE_ONLY, tmp_entity, MSG_INFO, APP_TEAM_ENT_2(flag, INFO_CTF_CAPTURE_), player.netname); }
        }
 
-       // notify server log too
-       if not(server_is_local)
+       // the previous notification broadcast is only sent to real clients, this will notify server log too
+       if(server_is_dedicated)
        {
                if(autocvar_notification_ctf_capture_verbose)
                {