* Fixed interpreting unsigned value as signed causing out of bounds when using model with more than 128 bones

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@10171 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
Sha..om 12 years ago
parent 37194e2f01
commit d169b700f2
  1. 2
      engine/src/core/com/jme3/animation/SkeletonControl.java

@ -385,7 +385,7 @@ public class SkeletonControl extends AbstractControl implements Cloneable {
for (int w = maxWeightsPerVert - 1; w >= 0; w--) { for (int w = maxWeightsPerVert - 1; w >= 0; w--) {
float weight = weights[idxWeights]; float weight = weights[idxWeights];
Matrix4f mat = offsetMatrices[indices[idxWeights++]]; Matrix4f mat = offsetMatrices[indices[idxWeights++] & 0xff];
rx += (mat.m00 * vtx + mat.m01 * vty + mat.m02 * vtz + mat.m03) * weight; rx += (mat.m00 * vtx + mat.m01 * vty + mat.m02 * vtz + mat.m03) * weight;
ry += (mat.m10 * vtx + mat.m11 * vty + mat.m12 * vtz + mat.m13) * weight; ry += (mat.m10 * vtx + mat.m11 * vty + mat.m12 * vtz + mat.m13) * weight;

Loading…
Cancel
Save