From ec0c4d33db9e0b7b3e541757e34c04c08c3b48c9 Mon Sep 17 00:00:00 2001 From: paramat Date: Thu, 23 Mar 2017 00:18:59 +0000 Subject: Map generation limit: Make per-world The setting limits map generation but affects nothing else. Add 'mapgen_limit' to global mapgen parameters. Move 'blockpos_over_mapgen_limit()' to the only place it is called from: map.cpp. Allow teleportation to any part of the world even if over the set mapgen limit. Simplify the reading of this limit in mgvalleys. Remove the 'map_generation_limit' setting. --- builtin/game/chatcommands.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'builtin/game/chatcommands.lua') diff --git a/builtin/game/chatcommands.lua b/builtin/game/chatcommands.lua index b4fa4f828..16f5f3be9 100644 --- a/builtin/game/chatcommands.lua +++ b/builtin/game/chatcommands.lua @@ -303,7 +303,7 @@ core.register_chatcommand("teleport", { p.y = tonumber(p.y) p.z = tonumber(p.z) if p.x and p.y and p.z then - local lm = tonumber(minetest.setting_get("map_generation_limit") or 31000) + local lm = 31000 if p.x < -lm or p.x > lm or p.y < -lm or p.y > lm or p.z < -lm or p.z > lm then return false, "Cannot teleport out of map bounds!" end -- cgit v1.2.3