Removed unnecessary cast, property access.

This commit is contained in:
NathanSweet 2014-05-21 10:11:16 +02:00
parent 45a1745449
commit 386134febe

View File

@ -102,10 +102,10 @@ namespace Spine {
float wx = 0, wy = 0;
int nn = bones[v++] + v;
for (; v < nn; v++, b += 3) {
Bone bone = (Bone)skeletonBones[bones[v]];
Bone bone = skeletonBones[bones[v]];
float vx = weights[b], vy = weights[b + 1], weight = weights[b + 2];
wx += (vx * bone.M00 + vy * bone.M01 + bone.worldX) * weight;
wy += (vx * bone.M10 + vy * bone.M11 + bone.worldY) * weight;
wx += (vx * bone.m00 + vy * bone.m01 + bone.worldX) * weight;
wy += (vx * bone.m10 + vy * bone.m11 + bone.worldY) * weight;
}
worldVertices[w] = wx + x;
worldVertices[w + 1] = wy + y;
@ -116,10 +116,10 @@ namespace Spine {
float wx = 0, wy = 0;
int nn = bones[v++] + v;
for (; v < nn; v++, b += 3, f += 2) {
Bone bone = (Bone)skeletonBones[bones[v]];
Bone bone = skeletonBones[bones[v]];
float vx = weights[b] + ffd[f], vy = weights[b + 1] + ffd[f + 1], weight = weights[b + 2];
wx += (vx * bone.M00 + vy * bone.M01 + bone.worldX) * weight;
wy += (vx * bone.M10 + vy * bone.M11 + bone.worldY) * weight;
wx += (vx * bone.m00 + vy * bone.m01 + bone.worldX) * weight;
wy += (vx * bone.m10 + vy * bone.m11 + bone.worldY) * weight;
}
worldVertices[w] = wx + x;
worldVertices[w + 1] = wy + y;