libgdx MD2Loader modification to fix animation name truncation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// in loadFrame() | |
int len = 0; | |
for (int i = 0; i < charBuffer.length; i++) { | |
// The following line changes to do proper truncation of frame index | |
// appended to the Marker name by the junaio export script from | |
// http://www.junaio.com/develop/docs/documenation/general/3dmodels/ | |
if (charBuffer[i] == 0 || Character.isDigit(charBuffer[i])) { | |
len = i; // was len = i - 1 (off by 1 error) | |
break; | |
} | |
} | |
frame.name = new String(charBuffer, 0, len); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment