Leinar / min3d

Automatically exported from code.google.com/p/min3d
0 stars 0 forks source link

MD2parser.getFrames() #13

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to parse any MD2 file without underscores in the frame names. 
2.
3.

What is the expected output? What do you see instead?
Parse the frame names. Bombs.

What version of the product are you using? On what operating system?
Head revision of the source. Android 1.6 on ADP 2

Please provide any additional information below.
The Ogro MD2 file has underscores in its frame names, but three other MD2 files 
that I have tried to load do not. I am not an expert on the MD2 format so I am 
not sure if underscores are required or not. I will attach one of the MD2 files 
below. 

This is how I temporarily have solved the issue. I am sure this is not the 
correct way to do this, but it got me past the errors so I could play the 
specific animations I wanted.

line 131 MD2Parser.java
if(name.indexOf("_") > 0)
{
        name = name.subSequence(0, name.lastIndexOf("_")).toString();
}
else
{   
    name = name.substring(0, 6).replaceAll("[0-9]{1,2}$", "");
}

Original issue reported on code.google.com by rc6750 on 21 Sep 2010 at 4:48

Attachments:

GoogleCodeExporter commented 9 years ago
Thank you very much for your help
Now, I can load the MD2 with another file name.

Original comment by srisu...@gmail.com on 5 Oct 2010 at 5:32

GoogleCodeExporter commented 9 years ago
Fixed. Thanks for investigating it & thanks for the solution!

Original comment by ippeldv@gmail.com on 1 Nov 2010 at 4:30