Allow players to cross barrier if fly=true, interact=false
This commit is contained in:
parent
7140e8430e
commit
678c86aef5
1 changed files with 7 additions and 4 deletions
|
@ -249,12 +249,15 @@ if minetest.get_modpath("ctf") then
|
|||
local name = player:get_player_name()
|
||||
local tname = ctf.player(name).team
|
||||
local pos = player:get_pos()
|
||||
if tname and
|
||||
(tname == "blue" and pos.z >= 0) or (tname == "red" and pos.z <= 0) then
|
||||
local privs = minetest.get_player_privs(name)
|
||||
if tname and not privs.fly and privs.interact then
|
||||
if (tname == "blue" and pos.z >= 0) or
|
||||
(tname == "red" and pos.z <= 0) then
|
||||
minetest.chat_send_player(name, "Match hasn't started yet!")
|
||||
ctf.move_to_spawn(name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if ctf_match.build_timer > 0.2 then
|
||||
minetest.after(0.2, pos_check)
|
||||
|
|
Loading…
Reference in a new issue