Fix respawn not working at all when suitable position was not found

The player should always be teleported away when they die and
we can still fall back to the engine spawning code.
This commit is contained in:
sfan5 2020-04-03 21:41:26 +02:00
parent fbbc7fc996
commit 8863527bb6

@ -135,6 +135,7 @@ local function on_spawn(player)
if success then
player:set_pos(spawn_pos)
end
return success
end
minetest.register_on_newplayer(function(player)
@ -153,7 +154,5 @@ minetest.register_on_respawnplayer(function(player)
return
end
on_spawn(player)
return true
return on_spawn(player)
end)