Stop players from taking flags in build time

This commit is contained in:
rubenwardy 2015-11-28 01:25:25 +00:00
parent 47f9da7041
commit a352454b28
2 changed files with 11 additions and 1 deletions

View file

@ -66,6 +66,16 @@ ctf_match.register_on_build_time_end(function()
end
end)
ctf_flag.register_on_prepick_up(function(name, flag)
if ctf_match.is_in_build_time() then
minetest.chat_send_player(name, "Match hasn't started yet!")
ctf.move_to_spawn(name)
return false
else
return true
end
end)
ctf.hud.register_part(function(player, name, tplayer)
if ctf_match.build_timer <= 0 then
ctf.hud:remove(player, "ctf_match:countdown")

@ -1 +1 @@
Subproject commit e672344383aeb9bea2a5b21f79ad66219db03116
Subproject commit 43b7d2c86c0a0a7c6f1b8f7d6c35cd936de752c2