Stop players from taking flags in build time
This commit is contained in:
parent
47f9da7041
commit
a352454b28
2 changed files with 11 additions and 1 deletions
|
@ -66,6 +66,16 @@ ctf_match.register_on_build_time_end(function()
|
||||||
end
|
end
|
||||||
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)
|
ctf.hud.register_part(function(player, name, tplayer)
|
||||||
if ctf_match.build_timer <= 0 then
|
if ctf_match.build_timer <= 0 then
|
||||||
ctf.hud:remove(player, "ctf_match:countdown")
|
ctf.hud:remove(player, "ctf_match:countdown")
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit e672344383aeb9bea2a5b21f79ad66219db03116
|
Subproject commit 43b7d2c86c0a0a7c6f1b8f7d6c35cd936de752c2
|
Loading…
Reference in a new issue