Fix_DynamicBones - Fix another recursion error #74

Merged
Njaecha merged 2 commits from FixAppendParticlesRecursionError into master 2025-01-12 22:56:19 +00:00
Njaecha commented 2025-01-12 22:23:39 +00:00 (Migrated from github.com)

Recursion is hard.
After appending a particle, and doing the cursive call on its child, every normal particle would continue to add a leaf particle (obvious in hindsight).
The original game code did not have this issue, even though it also did not return after the recursion call, because it only adds a leaf when the transform associated with the particle has zero children. That, however, is also undesirable since it will not add a leaf particle if the bone chain ends prematurely.

_Recursion is hard._ After appending a particle, and doing the cursive call on its child, every normal particle would continue to add a leaf particle (obvious in hindsight). The original game code did not have this issue, even though it also did not return after the recursion call, because it only adds a leaf when the transform associated with the particle has zero children. That, however, is also undesirable since it will not add a leaf particle if the bone chain ends prematurely.
ManlyMarco (Migrated from github.com) approved these changes 2025-01-12 22:55:38 +00:00
Sign in to join this conversation.
No description provided.