From ebe069816456e2a7de5ef267985ea3ee05c0b608 Mon Sep 17 00:00:00 2001 From: Cael_Aislinn Date: Sat, 25 Aug 2012 01:17:06 +1000 Subject: [PATCH] Allow server to initialise world without connected players (see https://github.com/dopeghoti/Baystation12/commit/f24af4140a2f84a0fbbd55141d5f5c6447bc3213) Signed-off-by: Cael_Aislinn --- code/game/algorithm.dm | 2 +- code/game/cellautomata.dm | 2 +- code/game/master_controller.dm | 7 +++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/code/game/algorithm.dm b/code/game/algorithm.dm index b9f08159b0f..ce1ffd5410c 100644 --- a/code/game/algorithm.dm +++ b/code/game/algorithm.dm @@ -28,7 +28,7 @@ Starting up. [time2text(world.timeofday, "hh:mm.ss")] make_datum_references_lists() //initialises global lists for referencing frequently used datums (so that we only ever do it once) process_teleport_locs() //Sets up the wizard teleport locations process_ghost_teleport_locs() //Sets up ghost teleport locations. - sleep_offline = 1 + //sleep_offline = 1 spawn(180) //so we aren't adding to the round-start lag /*if(config.ToRban) diff --git a/code/game/cellautomata.dm b/code/game/cellautomata.dm index b2c8a9d907b..c4dc11b4ac5 100644 --- a/code/game/cellautomata.dm +++ b/code/game/cellautomata.dm @@ -100,7 +100,7 @@ ..() - sleep(50) + //sleep(50) plmaster = new /obj/effect/overlay( ) plmaster.icon = 'icons/effects/tile_effects.dmi' diff --git a/code/game/master_controller.dm b/code/game/master_controller.dm index 3048e0fe9b3..f0505d1c087 100644 --- a/code/game/master_controller.dm +++ b/code/game/master_controller.dm @@ -46,6 +46,13 @@ datum/controller/game_controller world.tick_lag = config.Ticklag + // Sleep for about 5 seconds to allow background initialization procs to finish + sleep(50) + + // Now that the game is world is fully initialized, pause server until a user connects. + world.sleep_offline = 1 + + createRandomZlevel() setup_objects()