Revision d5032ac8
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/objects/RubikObject.java | ||
---|---|---|
414 | 414 |
{ |
415 | 415 |
final int numFaces = getNumFaces(); |
416 | 416 |
final float ratio = 1.0f/(numFaces+1); |
417 |
|
|
418 | 417 |
final Static4D[] maps = new Static4D[numFaces]; |
419 |
maps[face] = new Static4D( newColor*ratio, 0.0f, ratio, 1.0f); |
|
420 | 418 |
|
421 |
mCubits[cubit].getMesh().setTextureMap(maps); |
|
419 |
try |
|
420 |
{ |
|
421 |
maps[face] = new Static4D( newColor*ratio, 0.0f, ratio, 1.0f); |
|
422 |
mCubits[cubit].getMesh().setTextureMap(maps); |
|
423 |
} |
|
424 |
catch(ArrayIndexOutOfBoundsException ignored) |
|
425 |
{ |
|
426 |
// the object must have changed in between of us touching the screen and getting here |
|
427 |
// (which happens after the next render, i.e. about 30 miliseconds later) |
|
428 |
// ignore. |
|
429 |
} |
|
422 | 430 |
} |
423 | 431 |
|
424 | 432 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Fix for the next crash seen in the field.