diff options
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/skeleton_3d.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/3d/skeleton_3d.cpp b/scene/3d/skeleton_3d.cpp index 857916e23d..94fb49ae81 100644 --- a/scene/3d/skeleton_3d.cpp +++ b/scene/3d/skeleton_3d.cpp @@ -173,12 +173,15 @@ void Skeleton3D::_update_process_order() { parentless_bones.clear(); for (int i = 0; i < len; i++) { + bonesptr[i].child_bones.clear(); + } + + for (int i = 0; i < len; i++) { if (bonesptr[i].parent >= len) { //validate this just in case ERR_PRINT("Bone " + itos(i) + " has invalid parent: " + itos(bonesptr[i].parent)); bonesptr[i].parent = -1; } - bonesptr[i].child_bones.clear(); if (bonesptr[i].parent != -1) { int parent_bone_idx = bonesptr[i].parent; |