]> git.lizzy.rs Git - crafter_client.git/commitdiff
Add even more delay to the initialization
authoroilboi <47129783+oilboi@users.noreply.github.com>
Fri, 17 Apr 2020 11:09:22 +0000 (07:09 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Fri, 17 Apr 2020 11:09:22 +0000 (07:09 -0400)
init.lua

index 080fc8262ee5b09dfb88185d449eb9f767f693f9..ef4653dfaf9b1e683e52ecb3b874a1576c4d62d5 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -6,7 +6,7 @@ running_send = minetest.mod_channel_join("running_send")
 player_movement_state = minetest.mod_channel_join("player.player_movement_state")
 
 
-local function initialize_all()
+function initialize_all()
        --first we tell the server we're ready
        weather_intake:send_all("READY")
        weather_intake:leave()
@@ -25,7 +25,11 @@ end
 local initialize = false
 minetest.register_globalstep(function(dtime)
        if not initialize and minetest.camera and not vector.equals(minetest.camera:get_pos(),vector.new(0,0,0)) then
-               initialize = true
-               initialize_all()
+               minetest.after(2, function()
+                       if weather_intake then
+                               initialize = true
+                               initialize_all()
+                       end
+               end)
        end
 end)