Hide entity bug by not spawning maps at 0,0,0

This has always been a bug, it's just now more obvious as 0,0,0 may have been visible before.
Ideally the engine would just not bug with entity attachments, but alas.
A better mod-side fix would be to constantly reattach in wield3d and guages, but cba.
This commit is contained in:
rubenwardy 2018-01-26 16:17:42 +00:00
parent e1fd9c21db
commit 112d4389ea

View file

@ -49,11 +49,15 @@ function ctf_map.place_map(map)
minetest.after(2, function() minetest.after(2, function()
minetest.chat_send_all("Map: " .. map.name .. " by " .. map.author) minetest.chat_send_all("Map: " .. map.name .. " by " .. map.author)
end) end)
minetest.after(10, function()
minetest.fix_light(ctf_map.map.pos1, ctf_map.map.pos2)
end)
end, nil) end, nil)
end end
function ctf_match.load_map_meta(idx, name) function ctf_match.load_map_meta(idx, name)
local offset = vector.new(600 * (idx - 1), 0, 0) local offset = vector.new(600 * idx, 0, 0)
local meta = Settings(mapdir .. name .. ".conf") local meta = Settings(mapdir .. name .. ".conf")
local initial_stuff = meta:get("initial_stuff") local initial_stuff = meta:get("initial_stuff")
@ -133,11 +137,6 @@ ctf_match.register_on_new_match(function()
-- Place map -- Place map
ctf_map.place_map(ctf_map.map) ctf_map.place_map(ctf_map.map)
-- Fixes
minetest.after(10, function()
minetest.fix_light(ctf_map.map.pos1, ctf_map.map.pos2)
end)
end) end)
function ctf_match.create_teams() function ctf_match.create_teams()