diff --git a/homedecor_seating/init.lua b/homedecor_seating/init.lua index 4725e4ee..4f77efd5 100644 --- a/homedecor_seating/init.lua +++ b/homedecor_seating/init.lua @@ -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")