]> git.lizzy.rs Git - crafter_client.git/commitdiff
Fix minetest.camera not initializing before client runs globalstep
authoroilboi <47129783+oilboi@users.noreply.github.com>
Fri, 17 Apr 2020 09:55:20 +0000 (05:55 -0400)
committeroilboi <47129783+oilboi@users.noreply.github.com>
Fri, 17 Apr 2020 09:55:20 +0000 (05:55 -0400)
init.lua

index 8823eea845069afc6e41415e30a9d1c25a62171f..080fc8262ee5b09dfb88185d449eb9f767f693f9 100644 (file)
--- a/init.lua
+++ b/init.lua
@@ -24,7 +24,7 @@ end
 --since there does not seem to be any client_loaded function
 local initialize = false
 minetest.register_globalstep(function(dtime)
-       if not initialize and not vector.equals(minetest.camera:get_pos(),vector.new(0,0,0)) then
+       if not initialize and minetest.camera and not vector.equals(minetest.camera:get_pos(),vector.new(0,0,0)) then
                initialize = true
                initialize_all()
        end