mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-15 18:57:08 +00:00
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.
This commit is contained in:
parent
09f2cd0264
commit
ec0c4d33db
11 changed files with 45 additions and 47 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue