Remove ind_base from ctf_pvp_engine, fix ctf_flag.update not being called
This commit is contained in:
parent
9804ec7518
commit
622dcb8468
@ -190,27 +190,7 @@ function ctf_flag.assert_flag(flag)
|
||||
if nodename ~= "ctf_flag:flag" then
|
||||
ctf.log("flag", flag.team .. " has wrong node at flag position, " .. nodename .. ", correcting...")
|
||||
minetest.set_node(flag, { name = "ctf_flag:flag"})
|
||||
|
||||
local function base_at(flag, dx, dz)
|
||||
minetest.set_node({
|
||||
x = flag.x + dx,
|
||||
y = flag.y - 1,
|
||||
z = flag.z + dz,
|
||||
}, { name = "ctf_flag:ind_base"})
|
||||
end
|
||||
base_at(flag, -1, -1)
|
||||
base_at(flag, -1, 0)
|
||||
base_at(flag, -1, 1)
|
||||
base_at(flag, 0, -1)
|
||||
base_at(flag, 0, 0)
|
||||
base_at(flag, 0, 1)
|
||||
base_at(flag, 1, -1)
|
||||
base_at(flag, 1, 0)
|
||||
base_at(flag, 1, 1)
|
||||
|
||||
if minetest.get_node(flag).name ~= "ctf_flag:flag" then
|
||||
ctf_flag.update(flag)
|
||||
end
|
||||
ctf_flag.update(flag)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1,10 +1,3 @@
|
||||
minetest.register_node("ctf_flag:ind_base", {
|
||||
description = "Cheater!",
|
||||
groups = {immortal = 1},
|
||||
tiles = {"default_stone.png"},
|
||||
is_ground_content = false
|
||||
})
|
||||
|
||||
-- The flag
|
||||
minetest.register_node("ctf_flag:flag", {
|
||||
description = "Flag",
|
||||
|
Loading…
x
Reference in New Issue
Block a user