Fix crash when player dies and no maps are found
parent
67c9cf42c5
commit
a758a88b1e
|
@ -96,6 +96,8 @@ minetest.register_on_joinplayer(function(p)
|
|||
end)
|
||||
|
||||
minetest.register_on_respawnplayer(function(p)
|
||||
if not main.current_mode.playerspawns then return false end
|
||||
|
||||
p:set_pos(main.current_mode.playerspawns[math.random(1, #main.current_mode.playerspawns)])
|
||||
|
||||
return true
|
||||
|
|
Loading…
Reference in New Issue