Allow more than two teams in a match at once (#724)

* Fix bugs with more than two teams

* Fix team allocation

* Fix bugz

* Fix crash

* Fix crash with crash fix
This commit is contained in:
LoneWolfHT 2020-12-25 10:37:02 -08:00 committed by GitHub
parent 0ef16edb23
commit fbf0126599
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 87 additions and 30 deletions

View file

@ -237,8 +237,9 @@ if minetest.get_modpath("ctf") then
for _, player in pairs(minetest.get_connected_players()) do
if ctf_map.get_team_relative_z(player) < 0 and not ctf_map.can_cross(player) then
local name = player:get_player_name()
minetest.chat_send_player(name, "Match hasn't started yet!")
ctf.move_to_spawn(name)
if ctf.move_to_spawn(name) then
minetest.chat_send_player(name, "Match hasn't started yet!")
end
end
end