You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Replace List with LocalVector on Skeleton3D's bone transform update.
This commit is contained in:
@@ -847,12 +847,13 @@ void Skeleton3D::force_update_bone_children_transforms(int p_bone_idx) {
|
|||||||
ERR_FAIL_INDEX(p_bone_idx, bone_size);
|
ERR_FAIL_INDEX(p_bone_idx, bone_size);
|
||||||
|
|
||||||
Bone *bonesptr = bones.ptrw();
|
Bone *bonesptr = bones.ptrw();
|
||||||
List<int> bones_to_process = List<int>();
|
thread_local LocalVector<int> bones_to_process;
|
||||||
|
bones_to_process.clear();
|
||||||
bones_to_process.push_back(p_bone_idx);
|
bones_to_process.push_back(p_bone_idx);
|
||||||
|
|
||||||
while (bones_to_process.size() > 0) {
|
uint32_t index = 0;
|
||||||
int current_bone_idx = bones_to_process.front()->get();
|
while (index < bones_to_process.size()) {
|
||||||
bones_to_process.erase(current_bone_idx);
|
int current_bone_idx = bones_to_process[index];
|
||||||
|
|
||||||
Bone &b = bonesptr[current_bone_idx];
|
Bone &b = bonesptr[current_bone_idx];
|
||||||
bool bone_enabled = b.enabled && !show_rest_only;
|
bool bone_enabled = b.enabled && !show_rest_only;
|
||||||
@@ -905,6 +906,8 @@ void Skeleton3D::force_update_bone_children_transforms(int p_bone_idx) {
|
|||||||
for (int i = 0; i < child_bone_size; i++) {
|
for (int i = 0; i < child_bone_size; i++) {
|
||||||
bones_to_process.push_back(b.child_bones[i]);
|
bones_to_process.push_back(b.child_bones[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user