Pārlūkot izejas kodu

Shift attachment IDs to reduce effort needed to compute DeformTimeline ID.

NathanSweet 8 gadi atpakaļ
vecāks
revīzija
a8577b78a7

+ 1 - 1
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Animation.java

@@ -814,7 +814,7 @@ public class Animation {
 		}
 
 		public int getPropertyId () {
-			return (TimelineType.deform.ordinal() << 27) + ((slotIndex & 2047) << 16) + attachment.getId();
+			return (TimelineType.deform.ordinal() << 27) + attachment.getId() + slotIndex;
 		}
 
 		public void setSlotIndex (int index) {

+ 1 - 1
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/VertexAttachment.java

@@ -40,7 +40,7 @@ import com.esotericsoftware.spine.Slot;
 public class VertexAttachment extends Attachment {
 	static private int nextID;
 
-	private int id = nextID++ & 65535;
+	private int id = (nextID++ & 65535) << 11;
 	int[] bones;
 	float[] vertices;
 	int worldVerticesLength;