Skip to content

Commit

Permalink
[godot] Closes #2421, fix check whether mesh indices changed in betwe…
Browse files Browse the repository at this point in the history
…en frames.
  • Loading branch information
badlogic committed Nov 17, 2023
1 parent 094d3cb commit 54706ae
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spine-godot/spine_godot/SpineSprite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,7 @@ void SpineSprite::update_meshes(Ref<SpineSkeleton> skeleton_ref) {
mesh_instance->colors.set(j, Color(tint.r, tint.g, tint.b, tint.a));
}

auto indices_changed = true;
auto indices_changed = false;
if (mesh_instance->indices.size() == indices->size()) {
auto old_indices = mesh_instance->indices.ptr();
auto new_indices = indices->buffer();
Expand All @@ -780,6 +780,8 @@ void SpineSprite::update_meshes(Ref<SpineSkeleton> skeleton_ref) {
break;
}
}
} else {
indices_changed = true;
}

if (indices_changed) {
Expand Down

0 comments on commit 54706ae

Please sign in to comment.