Don't crash server if no spawn for team
This commit is contained in:
parent
5e59c46663
commit
2c7205b9a1
@ -361,9 +361,11 @@ minetest.register_on_respawnplayer(function(player)
|
||||
|
||||
if ctf.team(team) then
|
||||
local spawn = ctf.get_spawn(team)
|
||||
player:moveto(spawn, false)
|
||||
return true
|
||||
else
|
||||
return false
|
||||
if spawn then
|
||||
player:moveto(spawn, false)
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
return false
|
||||
end)
|
||||
|
Loading…
x
Reference in New Issue
Block a user