VanessaE wrote:Just executing remove_node() by itself doesn't cause them to fall. Adding the dig_node() call right after is what does it, probably because that call is intended to simulate a player actually digging the node (even if it's air), which triggers the engine's attached-item-falling code and also forces the engine to update the lighting in the immediate area, which tends to be a necessity with these huge trees.
I think that you should be patching the engine, creating a Lua function to do just the update-triggering part of digging.
Speaking of falling items etc., I sometimes see trees suspended in mid-air. Presumably, at map generation time, soil was placed there but later removed or dropped by some cavern generation code.
It could be useful to have the game handle groups of nodes much like it handles falling sand and gravel, but retaining shape – with some ‘attached to’ information: more than just which side, though, such that adjacent leaves aren't considered connected unless they share a (possibly indirect) attachment to a trunk node. Intent is that if all in the group can fall, then and only then will they fall.
(Implementation: I'd probably have it such that both spawning node and spawned node reference each other if part of a group.)