Fix sit_destruct calling funcs wrongly

This commit is contained in:
Wuzzy 2024-09-19 14:38:11 +02:00
parent 06e42034f3
commit 1f33988ac5

View File

@ -110,12 +110,9 @@ function xdecor.sit_destruct(pos)
local hash = minetest.hash_node_position(pos) local hash = minetest.hash_node_position(pos)
local occupier = seats_occupied[hash] local occupier = seats_occupied[hash]
if occupier then if occupier then
local player = minetest.get_player_by_name(occupier) stand_up(occupier)
if player then
stand_up(player)
end
seats_occupied[hash] = nil seats_occupied[hash] = nil
sitting[occupied] = nil sitting[occupier] = nil
end end
end end