From eefba5ce005111381078cfdf54eb7afdc29575a5 Mon Sep 17 00:00:00 2001 From: Putnam Date: Mon, 2 Mar 2020 11:24:46 -0800 Subject: [PATCH] Removes lag --- code/game/machinery/telecomms/machines/allinone.dm | 2 -- code/game/machinery/telecomms/machines/broadcaster.dm | 3 --- code/game/machinery/telecomms/machines/bus.dm | 9 +-------- code/game/machinery/telecomms/machines/processor.dm | 1 - code/game/machinery/telecomms/telecomunications.dm | 5 ----- 5 files changed, 1 insertion(+), 19 deletions(-) diff --git a/code/game/machinery/telecomms/machines/allinone.dm b/code/game/machinery/telecomms/machines/allinone.dm index c2dd9a7828..fbb5505586 100644 --- a/code/game/machinery/telecomms/machines/allinone.dm +++ b/code/game/machinery/telecomms/machines/allinone.dm @@ -35,8 +35,6 @@ signal.data["compression"] = 0 signal.mark_done() - if(signal.data["slow"] > 0) - sleep(signal.data["slow"]) // simulate the network lag if necessary signal.broadcast() /obj/machinery/telecomms/allinone/attackby(obj/item/P, mob/user, params) diff --git a/code/game/machinery/telecomms/machines/broadcaster.dm b/code/game/machinery/telecomms/machines/broadcaster.dm index 0abe97c72e..6b03bcc880 100644 --- a/code/game/machinery/telecomms/machines/broadcaster.dm +++ b/code/game/machinery/telecomms/machines/broadcaster.dm @@ -41,9 +41,6 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages return GLOB.recentmessages.Add(signal_message) - if(signal.data["slow"] > 0) - sleep(signal.data["slow"]) // simulate the network lag if necessary - signal.broadcast() if(!GLOB.message_delay) diff --git a/code/game/machinery/telecomms/machines/bus.dm b/code/game/machinery/telecomms/machines/bus.dm index ed7c33d50a..ce5ed31094 100644 --- a/code/game/machinery/telecomms/machines/bus.dm +++ b/code/game/machinery/telecomms/machines/bus.dm @@ -31,17 +31,10 @@ if(relay_information(signal, /obj/machinery/telecomms/processor)) return - // failed to send to a processor, relay information anyway - signal.data["slow"] += rand(1, 5) // slow the signal down only slightly - // Try sending it! var/list/try_send = list(signal.server_type, /obj/machinery/telecomms/hub, /obj/machinery/telecomms/broadcaster) - var/i = 0 for(var/send in try_send) - if(i) - signal.data["slow"] += rand(0, 1) // slow the signal down only slightly - i++ if(relay_information(signal, send)) break @@ -79,4 +72,4 @@ /obj/machinery/telecomms/bus/preset_one/birdstation name = "Bus" autolinkers = list("processor1", "common") - freq_listening = list() \ No newline at end of file + freq_listening = list() diff --git a/code/game/machinery/telecomms/machines/processor.dm b/code/game/machinery/telecomms/machines/processor.dm index 2362273469..a09b3ca8fb 100644 --- a/code/game/machinery/telecomms/machines/processor.dm +++ b/code/game/machinery/telecomms/machines/processor.dm @@ -28,7 +28,6 @@ if(istype(machine_from, /obj/machinery/telecomms/bus)) relay_direct_information(signal, machine_from) // send the signal back to the machine else // no bus detected - send the signal to servers instead - signal.data["slow"] += rand(5, 10) // slow the signal down relay_information(signal, signal.server_type) //Preset Processors diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm index 7a9f682d34..9c9cf40f98 100644 --- a/code/game/machinery/telecomms/telecomunications.dm +++ b/code/game/machinery/telecomms/telecomunications.dm @@ -39,11 +39,6 @@ GLOBAL_LIST_EMPTY(telecomms_list) return var/send_count = 0 - // Apply some lag based on traffic rates - var/netlag = round(traffic / 50) - if(netlag > signal.data["slow"]) - signal.data["slow"] = netlag - // Loop through all linked machines and send the signal or copy. for(var/obj/machinery/telecomms/machine in links) if(filter && !istype( machine, filter ))