Fix regression from #16: unable to use crate if left while using one (#17)

This commit is contained in:
1F616EMO~nya 2024-04-26 03:44:11 +08:00 committed by GitHub
parent b7bed50ac7
commit c2d82a615f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -323,12 +323,12 @@ minetest.register_node("towercrane:mast_ctrl_off", {
})
minetest.register_on_joinplayer(function(player)
-- To recover from a crash, this must be done unconditionally
reset_operator_privs(player)
local pos = get_my_crane_pos(player)
if pos then
stop_crane(pos, player)
end
-- To recover from a crash, this must be done unconditionally
reset_operator_privs(player)
end)
minetest.register_on_leaveplayer(function(player)