summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_function.cpp
diff options
context:
space:
mode:
author风青山 <idleman@yeah.net>2023-09-28 20:13:56 +0800
committer风青山 <idleman@yeah.net>2023-09-28 20:27:51 +0800
commite705aa4550b433461f670868342b757b864d1013 (patch)
tree3424977d06e704d997a627bd4dbf55d4b3d621fc /modules/gdscript/gdscript_function.cpp
parent4c3dc26367518e006f8555c12f5d2df0b8a28192 (diff)
downloadredot-engine-e705aa4550b433461f670868342b757b864d1013.tar.gz
Fix not refitting upward from leaf nodes.
Previously, the wrong node id (root node id) was used. Dirty leaf nodes do not actually recalculate aabb. Additionally, when requesting a new leaf, mark `dirty` as `false` in `clear()`. Make sure to only mark the leaf as **dirty** when shrinking the border of the leaf when removing items. In other cases, the leaf node's aabb will get the correct result immediately. 1. When adding an item, the leaf nodes will be calculated immediately. 2. Removing the item within the border of the leaf node has no effect on the original aabb.
Diffstat (limited to 'modules/gdscript/gdscript_function.cpp')
0 files changed, 0 insertions, 0 deletions