Explorar el Código

fix incorrect ordering issue when applying custom materials to slot nodes (#2205)

Jordan Schidlowsky hace 2 años
padre
commit
e83b9c1714
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      spine-godot/spine_godot/SpineSprite.cpp

+ 1 - 1
spine-godot/spine_godot/SpineSprite.cpp

@@ -621,7 +621,7 @@ void SpineSprite::update_meshes(Ref<SpineSkeleton> skeleton_ref) {
 			Ref<Material> custom_material;
 			Ref<Material> custom_material;
 
 
 			// See if we have a slot node for this slot with a custom material
 			// See if we have a slot node for this slot with a custom material
-			auto &nodes = slot_nodes[i];
+			auto &nodes = slot_nodes[slot->getData().getIndex()];
 			if (nodes.size() > 0) {
 			if (nodes.size() > 0) {
 				auto slot_node = nodes[0];
 				auto slot_node = nodes[0];
 				if (slot_node) {
 				if (slot_node) {