From 532fa4615a209055dc237fafc6dc3f72631a9c9d Mon Sep 17 00:00:00 2001 From: Kyle Spier-Swenson Date: Mon, 12 Sep 2016 11:24:27 -0700 Subject: [PATCH] Fixes byond triggering 511 client required needlessly (#20478) byond saw a access for `fps` in a client proc and assumed things. --- code/modules/admin/verbs/fps.dm | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/code/modules/admin/verbs/fps.dm b/code/modules/admin/verbs/fps.dm index 0866a5859ea..901e6f636a4 100644 --- a/code/modules/admin/verbs/fps.dm +++ b/code/modules/admin/verbs/fps.dm @@ -7,18 +7,18 @@ if(!check_rights(R_DEBUG)) return - var/fps = round(input("Sets game frames-per-second. Can potentially break the game","FPS", config.fps) as num|null) + var/new_fps = round(input("Sets game frames-per-second. Can potentially break the game (default: [config.fps])","FPS", world.fps) as num|null) - if(fps <= 0) - src << "Error: ticklag(): Invalid world.ticklag value. No changes made." + if(new_fps <= 0) + src << "Error: set_server_fps(): Invalid world.fps value. No changes made." return - if(fps > config.fps) - if(alert(src, "You are setting fps to a high value:\n\t[fps] frames-per-second\n\tconfig.fps = [config.fps]","Warning!","Confirm","ABORT-ABORT-ABORT") != "Confirm") + if(new_fps > config.fps*1.5) + if(alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [config.fps]","Warning!","Confirm","ABORT-ABORT-ABORT") != "Confirm") return - var/msg = "[key_name(src)] has modified world.fps to [fps]" + var/msg = "[key_name(src)] has modified world.fps to [new_fps]" log_admin(msg, 0) message_admins(msg, 0) feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - world.fps = fps \ No newline at end of file + world.fps = new_fps \ No newline at end of file