Make .bullet serialization mode robust:
Deal with broken DNA serialization. Bullet 2.76 release revision 2035 - 2046 was broken, and this includes the Maya Dynamica plugin. Added some workaround to deal with the broken .bullet files, instead of crashing.
This commit is contained in:
@@ -104,7 +104,11 @@ struct btIntIndexData
|
||||
int m_value;
|
||||
};
|
||||
|
||||
|
||||
struct btShortIntIndexData
|
||||
{
|
||||
short m_value;
|
||||
char m_pad[2];
|
||||
};
|
||||
|
||||
struct btShortIntIndexTripletData
|
||||
{
|
||||
@@ -121,6 +125,8 @@ struct btMeshPartData
|
||||
btIntIndexData *m_indices32;
|
||||
btShortIntIndexTripletData *m_3indices16;
|
||||
|
||||
btShortIntIndexData *m_indices16;//backwards compatibility
|
||||
|
||||
int m_numTriangles;//length of m_indices = m_numTriangles
|
||||
int m_numVertices;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user