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,10 +249,13 @@ if minetest.get_modpath("ctf") then
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local tname = ctf.player(name).team
|
local tname = ctf.player(name).team
|
||||||
local pos = player:get_pos()
|
local pos = player:get_pos()
|
||||||
if tname and
|
local privs = minetest.get_player_privs(name)
|
||||||
(tname == "blue" and pos.z >= 0) or (tname == "red" and pos.z <= 0) then
|
if tname and not privs.fly and privs.interact then
|
||||||
minetest.chat_send_player(name, "Match hasn't started yet!")
|
if (tname == "blue" and pos.z >= 0) or
|
||||||
ctf.move_to_spawn(name)
|
(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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue