[godot] Closes #2421, fix check whether mesh indices changed in between frames.

This commit is contained in:
Mario Zechner 2023-11-17 19:30:16 +01:00
parent 094d3cbda7
commit 54706aeea7

View File

@ -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();
@ -780,6 +780,8 @@ void SpineSprite::update_meshes(Ref<SpineSkeleton> skeleton_ref) {
break;
}
}
} else {
indices_changed = true;
}
if (indices_changed) {