Safely change world.fps

- Added world.change_fps() proc to safely change world.fps
- Its important that SStimer be informed whenever world.tick_lag or world.fps change, so always use the proc, never set the var directly!
This commit is contained in:
Leshana
2020-03-21 19:01:33 -04:00
parent 3ad3b7956b
commit 1ab0524daa
4 changed files with 17 additions and 3 deletions

View File

@@ -196,7 +196,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
#else
world.sleep_offline = 1
#endif
world.fps = config.fps
world.change_fps(config.fps)
var/initialized_tod = REALTIMEOFDAY
sleep(1)
initializations_finished_with_no_players_logged_in = initialized_tod < REALTIMEOFDAY - 10