Fix barrier not coming down correctly
This commit is contained in:
parent
1f3f7d20e9
commit
a43bcc78af
3 changed files with 10 additions and 4 deletions
|
@ -24,6 +24,9 @@ function ctf_match.is_in_build_time()
|
|||
return ctf_match.build_timer > 0
|
||||
end
|
||||
|
||||
ctf_match.register_on_new_match(function()
|
||||
ctf_match.build_timer = ctf.setting("match.build_time")
|
||||
end)
|
||||
ctf.register_on_new_game(function()
|
||||
ctf_match.build_timer = ctf.setting("match.build_time")
|
||||
if ctf_match.build_timer > 0 then
|
||||
|
|
|
@ -2,8 +2,11 @@ ctf.register_on_init(function()
|
|||
ctf._set("match.map_reset_limit", 0)
|
||||
end)
|
||||
|
||||
local old = ctf_match.next
|
||||
function ctf_match.next()
|
||||
for i = 1, #ctf_match.registered_on_new_match do
|
||||
ctf_match.registered_on_new_match[i]()
|
||||
end
|
||||
|
||||
local r = ctf.setting("match.map_reset_limit")
|
||||
if r > 0 then
|
||||
minetest.chat_send_all("Resetting the map, this may take a few moments...")
|
||||
|
@ -11,10 +14,10 @@ function ctf_match.next()
|
|||
minetest.delete_area(vector.new(-r, -r, -r), vector.new(r, r, r))
|
||||
|
||||
minetest.after(1, function()
|
||||
old()
|
||||
ctf.reset()
|
||||
end)
|
||||
end)
|
||||
else
|
||||
old()
|
||||
ctf.reset()
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 43b7d2c86c0a0a7c6f1b8f7d6c35cd936de752c2
|
||||
Subproject commit e0b9b476ee2fd577e62afaab9b410f009516687b
|
Loading…
Reference in a new issue