summaryrefslogtreecommitdiffstats
path: root/scene/resources/2d/skeleton/skeleton_modification_2d_jiggle.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/2d/skeleton/skeleton_modification_2d_jiggle.cpp')
-rw-r--r--scene/resources/2d/skeleton/skeleton_modification_2d_jiggle.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/scene/resources/2d/skeleton/skeleton_modification_2d_jiggle.cpp b/scene/resources/2d/skeleton/skeleton_modification_2d_jiggle.cpp
index 2ace9577e4..b7200b49c4 100644
--- a/scene/resources/2d/skeleton/skeleton_modification_2d_jiggle.cpp
+++ b/scene/resources/2d/skeleton/skeleton_modification_2d_jiggle.cpp
@@ -254,6 +254,8 @@ void SkeletonModification2DJiggle::_setup_modification(SkeletonModificationStack
Bone2D *bone2d_node = stack->skeleton->get_bone(bone_idx);
jiggle_data_chain.write[i].dynamic_position = bone2d_node->get_global_position();
}
+
+ jiggle_joint_update_bone2d_cache(i);
}
}
@@ -263,7 +265,9 @@ void SkeletonModification2DJiggle::_setup_modification(SkeletonModificationStack
void SkeletonModification2DJiggle::update_target_cache() {
if (!is_setup || !stack) {
- ERR_PRINT_ONCE("Cannot update target cache: modification is not properly setup!");
+ if (is_setup) {
+ ERR_PRINT_ONCE("Cannot update target cache: modification is not properly setup!");
+ }
return;
}
@@ -285,7 +289,9 @@ void SkeletonModification2DJiggle::update_target_cache() {
void SkeletonModification2DJiggle::jiggle_joint_update_bone2d_cache(int p_joint_idx) {
ERR_FAIL_INDEX_MSG(p_joint_idx, jiggle_data_chain.size(), "Cannot update bone2d cache: joint index out of range!");
if (!is_setup || !stack) {
- ERR_PRINT_ONCE("Cannot update Jiggle " + itos(p_joint_idx) + " Bone2D cache: modification is not properly setup!");
+ if (is_setup) {
+ ERR_PRINT_ONCE("Cannot update Jiggle " + itos(p_joint_idx) + " Bone2D cache: modification is not properly setup!");
+ }
return;
}
@@ -425,7 +431,6 @@ void SkeletonModification2DJiggle::set_jiggle_joint_bone_index(int p_joint_idx,
jiggle_data_chain.write[p_joint_idx].bone_idx = p_bone_idx;
}
} else {
- WARN_PRINT("Cannot verify the Jiggle joint " + itos(p_joint_idx) + " bone index for this modification...");
jiggle_data_chain.write[p_joint_idx].bone_idx = p_bone_idx;
}