MD2 Export Messing Up Normals?

Hi, I’m getting some strange results with the code I got here with lighting and changing normals. I think maybe my normals are screwed up in the MD2 export, but they look fine in Blender. Does anyone have any ideas as to what might be wrong?