1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-12-22 16:10:18 +01:00

handle corner case where player dies while in chair

This commit is contained in:
wsor4035 2024-11-05 01:20:34 -05:00
parent 40898101be
commit d8ae7a360d

View File

@ -210,6 +210,13 @@ function lrfurn.stand(clicker)
end
end
--if the player gets killed in the seat, handle it
minetest.register_on_dieplayer(function(player)
if seated_cache[player:get_player_name()] then
lrfurn.stand(player)
end
end)
dofile(modpath.."/longsofas.lua")
dofile(modpath.."/sofas.lua")
dofile(modpath.."/armchairs.lua")