minetest_game
minetest_game copied to clipboard
[no sq] Kick players from beds that have ceased existing
Fixes #3167. Done via a globalstep, which is not a concern. I believe this to be the most straightforward approach; it is unrealistic to efficiently hook all possible ways the node could be removed.
I have no issues with this approach but shouldn't on_destruct be enough actually? (except vmanips)
I have no issues with this approach but shouldn't
on_destructbe enough actually? (except vmanips)
I think so, yes. VoxelManips might appear naturally in gameplay though, e.g. explosions - you still want the player to be kicked from bed when it was blown up (we could now start with on_blast etc, but that puts us back in the catch all situation).
The sleep formspec does neither get closed nor updated on kick. Is that intentional? Granted, it does precisely fix the linked issue.
Ping.
Furthermore, what is the purpose of beds.is_bed_node, or the bed = 1 node group, respectively? Either of them seems superfluous.