Don't crash server if no spawn for team

This commit is contained in:
rubenwardy 2015-07-15 09:51:25 +01:00
parent 5e59c46663
commit 2c7205b9a1

View File

@ -361,9 +361,11 @@ minetest.register_on_respawnplayer(function(player)
if ctf.team(team) then if ctf.team(team) then
local spawn = ctf.get_spawn(team) local spawn = ctf.get_spawn(team)
player:moveto(spawn, false) if spawn then
return true player:moveto(spawn, false)
else return true
return false end
end end
return false
end) end)