mirror of
https://github.com/minetest/minetest_game.git
synced 2024-11-05 07:13:52 +01:00
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:
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)
|
||||
|
Loading…
Reference in New Issue
Block a user