mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-26 04:21:07 +01:00
Fix crash when new player rightclicks a bed
This commit is contained in:
parent
4e9190bbcf
commit
dbef60c558
1 changed files with 6 additions and 4 deletions
|
@ -459,10 +459,12 @@ function mcl_spawn.set_spawn_pos(player, pos, message)
|
|||
|
||||
|
||||
|
||||
local old_bed_meta = minetest.get_meta(oldpos)
|
||||
if oldpos ~= pos and old_bed_meta then
|
||||
mcl_log("Removing old bed meta")
|
||||
old_bed_meta:set_string("player", "")
|
||||
if oldpos and oldpos ~= pos then
|
||||
local old_bed_meta = minetest.get_meta(oldpos)
|
||||
if old_bed_meta then
|
||||
mcl_log("Removing old bed meta")
|
||||
old_bed_meta:set_string("player", "")
|
||||
end
|
||||
else
|
||||
mcl_log("No old bed meta to remove or same as current")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue