Skip to content

Commit

Permalink
Dont do init transform if you dont need to. (#2495)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwinterpixel authored and badlogic committed Apr 30, 2024
1 parent 6118a5f commit 07f2994
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions spine-godot/spine_godot/SpineBoneNode.cpp
Expand Up @@ -232,9 +232,11 @@ SpineConstant::BoneMode SpineBoneNode::get_bone_mode() {
}

void SpineBoneNode::set_bone_mode(SpineConstant::BoneMode _bone_mode) {
bone_mode = _bone_mode;
SpineSprite *sprite = find_parent_sprite();
init_transform(sprite);
if (bone_mode != _bone_mode) {
bone_mode = _bone_mode;
SpineSprite *sprite = find_parent_sprite();
init_transform(sprite);
}
}

void SpineBoneNode::set_debug_thickness(float _thickness) {
Expand Down

0 comments on commit 07f2994

Please sign in to comment.