1
0
mirror of https://github.com/luanti-org/minetest_game.git synced 2026-01-13 20:55:36 +01:00

Fix player not kicked out of bed on destruct (#3225)

This commit is contained in:
Wuzzy
2026-01-10 12:00:44 +01:00
committed by GitHub
parent df4bd15ba4
commit b517bdb547
3 changed files with 24 additions and 0 deletions

View File

@@ -36,6 +36,11 @@ local function destruct_bed(pos, n)
beds.remove_spawns_at(other)
end
beds.remove_spawns_at(pos)
if n == 1 then
beds.kick_player_at(pos)
elseif n == 2 and other then
beds.kick_player_at(other)
end
end
function beds.register_bed(name, def)