Skip to content

Commit 8863527

Browse files
committedApr 4, 2020
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.
1 parent fbbc7fc commit 8863527

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
 

‎mods/spawn/init.lua

+2-3
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ local function on_spawn(player)
135135
if success then
136136
player:set_pos(spawn_pos)
137137
end
138+
return success
138139
end
139140

140141
minetest.register_on_newplayer(function(player)
@@ -153,7 +154,5 @@ minetest.register_on_respawnplayer(function(player)
153154
return
154155
end
155156

156-
on_spawn(player)
157-
158-
return true
157+
return on_spawn(player)
159158
end)

0 commit comments

Comments
 (0)
Please sign in to comment.