Fix doc and forceloading crash.
authorNovatux <nathanael.courant@laposte.net>
Sun, 12 Jan 2014 12:53:10 +0000 (13:53 +0100)
committerNovatux <nathanael.courant@laposte.net>
Sun, 12 Jan 2014 13:31:32 +0000 (14:31 +0100)
builtin/forceloading.lua
doc/lua_api.txt

index 021de075b56cffbbaf299789945b2d1718431619..84895792b7161816cf8a097ca718776b94627d76 100644 (file)
@@ -22,7 +22,7 @@ function minetest.forceload_block(pos)
                blocks_forceloaded[hash] = blocks_forceloaded[hash] + 1
                return true
        else
-               if total_forceloaded >= (minetest.setting_get("max_forceloaded_blocks") or 16) then
+               if total_forceloaded >= (tonumber(minetest.setting_get("max_forceloaded_blocks")) or 16) then
                        return false
                end
                total_forceloaded = total_forceloaded+1
index afb142513aa9206e6fccdd55d29de34ca32b3d8c..47232ae16bfc76b48ce1e163af06532f44396ea5 100644 (file)
@@ -1517,6 +1517,8 @@ Random:
 minetest.get_connected_players() -> list of ObjectRefs
 minetest.hash_node_position({x=,y=,z=}) -> 48-bit integer
 ^ Gives a unique hash number for a node position (16+16+16=48bit)
+minetest.get_position_from_hash(hash) -> postion
+^ Inverse transform of minetest.hash_node_postion
 minetest.get_item_group(name, group) -> rating
 ^ Get rating of a group of an item. (0 = not in group)
 minetest.get_node_group(name, group) -> rating