forked from minetest/minetest_game
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
|
if success then
|
||||||
player:set_pos(spawn_pos)
|
player:set_pos(spawn_pos)
|
||||||
end
|
end
|
||||||
|
return success
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_newplayer(function(player)
|
minetest.register_on_newplayer(function(player)
|
||||||
@ -153,7 +154,5 @@ minetest.register_on_respawnplayer(function(player)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
on_spawn(player)
|
return on_spawn(player)
|
||||||
|
|
||||||
return true
|
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user