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
|
if ctf.team(team) then
|
||||||
local spawn = ctf.get_spawn(team)
|
local spawn = ctf.get_spawn(team)
|
||||||
|
if spawn then
|
||||||
player:moveto(spawn, false)
|
player:moveto(spawn, false)
|
||||||
return true
|
return true
|
||||||
else
|
|
||||||
return false
|
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
end)
|
end)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user