From a352454b287d74453101f03b5c01912a889b1310 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Sat, 28 Nov 2015 01:25:25 +0000 Subject: [PATCH] Stop players from taking flags in build time --- mods/ctf_match/buildtime.lua | 10 ++++++++++ mods/ctf_pvp_engine | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/mods/ctf_match/buildtime.lua b/mods/ctf_match/buildtime.lua index dffb26f..07c6309 100644 --- a/mods/ctf_match/buildtime.lua +++ b/mods/ctf_match/buildtime.lua @@ -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") diff --git a/mods/ctf_pvp_engine b/mods/ctf_pvp_engine index e672344..43b7d2c 160000 --- a/mods/ctf_pvp_engine +++ b/mods/ctf_pvp_engine @@ -1 +1 @@ -Subproject commit e672344383aeb9bea2a5b21f79ad66219db03116 +Subproject commit 43b7d2c86c0a0a7c6f1b8f7d6c35cd936de752c2