Check cache_parent_physical_bone when rebuilding parent cache
(cherry picked from commit 96fe795bdb
)
This commit is contained in:
parent
057c9f601b
commit
14969a5945
@ -666,7 +666,7 @@ void Skeleton::_rebuild_physical_bones_cache() {
|
|||||||
const int b_size = bones.size();
|
const int b_size = bones.size();
|
||||||
for (int i = 0; i < b_size; ++i) {
|
for (int i = 0; i < b_size; ++i) {
|
||||||
PhysicalBone *parent_pb = _get_physical_bone_parent(i);
|
PhysicalBone *parent_pb = _get_physical_bone_parent(i);
|
||||||
if (parent_pb != bones[i].physical_bone) {
|
if (parent_pb != bones[i].cache_parent_physical_bone) {
|
||||||
bones.write[i].cache_parent_physical_bone = parent_pb;
|
bones.write[i].cache_parent_physical_bone = parent_pb;
|
||||||
if (bones[i].physical_bone) {
|
if (bones[i].physical_bone) {
|
||||||
bones[i].physical_bone->_on_bone_parent_changed();
|
bones[i].physical_bone->_on_bone_parent_changed();
|
||||||
|
Loading…
Reference in New Issue
Block a user