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:
parent
40898101be
commit
d8ae7a360d
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user