Skip to content

Conversation

lawnjelly
Copy link
Member

If the force_update flag remained set after the node was removed from the update lists, the node would never be updated in future. This could occur with hidden nodes that were moved after hiding.

Fixes #107142
Backport of #107175

Explanation

The SceneTreeFTI relies on node flags being in sync with nodes being on various update lists. This bug occurred for the forced frame update list, because the node flag was being cleared in the tree traversal, however invisible nodes were never having their flag cleared, and once the list was cleared the flag and the list became out of sync.

At further node movements, the logic determined incorrectly that the node was already on the update list.

We fix it by removing the flag manually on every node in the list rather than at traversal time.

Notes

  • It's possible this can be done in a more optimal way at a later stage, but this shouldn't be bad.

@lawnjelly lawnjelly added this to the 3.7 milestone Jun 5, 2025
@lawnjelly lawnjelly requested a review from a team as a code owner June 5, 2025 19:03
@lawnjelly lawnjelly requested review from Calinou and rburing June 5, 2025 19:05
@akien-mga akien-mga changed the title [3.x] - SceneTreeFTI - Fix force_update flag for invisible nodes [3.x] SceneTreeFTI - Fix force_update flag for invisible nodes Jun 5, 2025
Copy link
Member

@Ivorforce Ivorforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving as equivalent to #107175

@lawnjelly lawnjelly merged commit 5ff65c8 into godotengine:3.x Jun 12, 2025
14 checks passed
@lawnjelly
Copy link
Member Author

Thanks!

@lawnjelly lawnjelly deleted the scenetreefti_fix_hidden_forced branch June 12, 2025 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants