From 8863527bb62c0cb3bf19d6d2acf6ecb817e61cc2 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Fri, 3 Apr 2020 21:41:26 +0200 Subject: [PATCH] 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. --- mods/spawn/init.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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) -- 2.25.1