MD2 bug in klepto-version?

BlitzMax Modules Forums/MiniB3D/MD2 bug in klepto-version?

SuperStrict

Import sidesign.minib3d

Graphics3D(640,480)

Local camera:TCamera = CreateCamera()

CameraViewport(camera,0,0,GraphicsWidth(),GraphicsHeight())

Local explostar:TMesh = LoadMD2("explostar.md2")

MoveEntity(explostar,0,0,5)

While Not KeyHit(27)

	TurnEntity(explostar,1,1,1)
	
	UpdateWorld()
	
	RenderWorld()

	Flip()
		
Wend


This litttle program gives me an error (Attempt to index array element beyond array length) regardless of what size the md2 mesh is. I use AC3D to export and I'm using an Intel Mac.

without the model it is hard to say whats going wrong ;)
maybe you could send it to me (I will handle it with respect).

Email sent ^^
It's just a triangulated sphere =)

Bug found:

If you could build your module by yourself, then change the following in the TMD2.bmx:
Local Surface:TSurface = CreateSurface(Mesh)
Local Frame:TMD2Frame = Frames[1] ' this is the bug
Local c:Int = 0

to
Local Surface:TSurface = CreateSurface(Mesh)
Local Frame:TMD2Frame = Frames[0]
Local c:Int = 0


its in the method BuildMesh() on line:
130

I hope this will help you.

This did the job, thank you ^^