Allow server to initialize the world without any players connected.

Without this patch, the first user had to wait for the server to
actually initialize the game. During this time the main window
of the client is not responsive to input. Now, when the first
player connects, they will see a fully initialized and responsive
lobby.
This commit is contained in:
Rob Palkowski
2012-05-07 18:40:07 -07:00
parent 08fa9101a7
commit f24af4140a
3 changed files with 9 additions and 6 deletions
+1 -2
View File
@@ -27,7 +27,6 @@ Today, these people were mean:
LoadBans()
process_teleport_locs() //Sets up the wizard teleport locations
process_ghost_teleport_locs() //Sets up ghost teleport locations.
sleep_offline = 1
if (config.kick_inactive)
spawn(30)
@@ -201,4 +200,4 @@ proc/countJob(rank)
var/mob/M = T.host
if(M.client && M.machine == subject)
subject.attack_hand(M)
*/
*/
+1 -3
View File
@@ -106,8 +106,6 @@
..()
sleep(50)
plmaster = new /obj/effect/overlay( )
plmaster.icon = 'tile_effects.dmi'
plmaster.icon_state = "plasma"
@@ -196,4 +194,4 @@
/obj/effect/decal/point/point()
set src in oview()
set hidden = 1
return
return
+7 -1
View File
@@ -47,6 +47,12 @@ 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
setup_objects()
setupgenetics()
@@ -235,4 +241,4 @@ datum/controller/game_controller
else
for (var/mob/M in world)
if (M.client && M.client.holder)
M << "<font color='red' size='2'><b> The Master Controller has fired. Automatic restart aborted.</b></font>"
M << "<font color='red' size='2'><b> The Master Controller has fired. Automatic restart aborted.</b></font>"