Skip to content

Commit

Permalink
Fix doc and forceloading crash.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ekdohibs committed Jan 12, 2014
1 parent a3586cd commit 676f34a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/forceloading.lua
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions doc/lua_api.txt
Expand Up @@ -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
Expand Down

0 comments on commit 676f34a

Please sign in to comment.