Fix middle barrier not being removed

This commit is contained in:
rubenwardy 2018-01-26 17:40:09 +00:00
parent e44942ba05
commit 8727cc77eb
2 changed files with 6 additions and 7 deletions

View file

@ -9,21 +9,19 @@ local c_water_f = minetest.get_content_id("default:water_flowing")
local c_air = minetest.get_content_id("air")
function ctf_map.remove_middle_barrier()
minetest.log("error", "Removing middle barrier!")
local r = ctf_map.map.r
local h = ctf_map.map.h
local min = {
local min = vector.add(ctf_map.map.offset, {
x = -r + 1,
y = -h / 2,
z = -1
}
local max = {
})
local max = vector.add(ctf_map.map.offset, {
x = r - 1,
y = h / 2,
z = 1
}
})
local vm = minetest.get_voxel_manip()
local emin, emax = vm:read_from_map(min, max)

View file

@ -57,7 +57,7 @@ function ctf_map.place_map(map)
local seed = minetest.get_mapgen_setting("seed")
for _, value in pairs(ctf_map.map.teams) do
place_chests(value.chests.from, value.chests.to, seed, value.chests.n)
minetest.log("error", "Placing " .. value.chests.n .. " chests from " ..
minetest.log("info", "Placing " .. value.chests.n .. " chests from " ..
minetest.pos_to_string(value.chests.from) .. " to "..
minetest.pos_to_string(value.chests.to))
@ -89,6 +89,7 @@ function ctf_match.load_map_meta(idx, name)
h = tonumber(meta:get("h")),
teams = {},
initial_stuff = initial_stuff and initial_stuff:split(","),
offset = offset,
}
assert(map.r <= max_r)