From: sfan5 Date: Fri, 3 Apr 2020 19:41:26 +0000 (+0200) Subject: Fix respawn not working at all when suitable position was not found X-Git-Tag: 5.2.0 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=e5a725b64300d861ee4a08c4be3debb77ebe6b76;p=oweals%2Fminetest_game.git 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. --- diff --git a/mods/spawn/init.lua b/mods/spawn/init.lua index 0e1261e6..12c957f9 100644 --- a/mods/spawn/init.lua +++ b/mods/spawn/init.lua @@ -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)