Skip to content

Commit

Permalink
handle corner case where player dies while in chair
Browse files Browse the repository at this point in the history
  • Loading branch information
wsor4035 committed Nov 5, 2024
1 parent 4089810 commit d8ae7a3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions homedecor_seating/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit d8ae7a3

Please sign in to comment.