Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic Tickrate #323

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions code/controllers/master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@
if (skip_ticks)
skip_ticks--
src.sleep_delta = MC_AVERAGE_FAST(src.sleep_delta, sleep_delta)
UpdateTickRate()

// Force any verbs into overtime, to test how they perfrom under load
// For local ONLY
Expand Down Expand Up @@ -774,7 +775,6 @@
msg = "(TickRate:[Master.processing]) (Iteration:[Master.iteration]) (TickLimit: [round(Master.current_ticklimit, 0.1)])"
return msg


/datum/controller/master/StartLoadingMap()
//disallow more than one map to load at once, multithreading it will just cause race conditions
while(map_loading)
Expand All @@ -790,15 +790,10 @@
var/datum/controller/subsystem/SS = S
SS.StopLoadingMap()


/datum/controller/master/proc/UpdateTickRate()
if (!processing)
return
var/client_count = length(GLOB.clients)
if (client_count < CONFIG_GET(number/mc_tick_rate/disable_high_pop_mc_mode_amount))
processing = CONFIG_GET(number/mc_tick_rate/base_mc_tick_rate)
else if (client_count > CONFIG_GET(number/mc_tick_rate/high_pop_mc_mode_amount))
processing = CONFIG_GET(number/mc_tick_rate/high_pop_mc_tick_rate)
processing = clamp(1 - (round(SStime_track.time_dilation_avg_fast * 0.01, 0.1)) 1, 0)

Check failure on line 796 in code/controllers/master.dm

View workflow job for this annotation

GitHub Actions / Run Linters

got '1', expected one of: operator, field access, ')', ','

/datum/controller/master/proc/OnConfigLoad()
for (var/thing in subsystems)
Expand Down
Loading