mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Fixes byond triggering 511 client required needlessly (#20478)
byond saw a access for `fps` in a client proc and assumed things.
This commit is contained in:
committed by
Remie Richards
parent
60af397dce
commit
532fa4615a
@@ -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 << "<span class='danger'>Error: ticklag(): Invalid world.ticklag value. No changes made.</span>"
|
||||
if(new_fps <= 0)
|
||||
src << "<span class='danger'>Error: set_server_fps(): Invalid world.fps value. No changes made.</span>"
|
||||
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
|
||||
world.fps = new_fps
|
||||
Reference in New Issue
Block a user