fix a serialization bug with btStridingMeshInterface with short indices (16 bit)
This commit is contained in:
@@ -1112,7 +1112,7 @@ btRigidBody* btBulletWorldImporter::getRigidBodyByName(const char* name)
|
||||
btRigidBody** bodyPtr = m_nameBodyMap.find(name);
|
||||
if (bodyPtr && *bodyPtr)
|
||||
{
|
||||
*bodyPtr;
|
||||
return *bodyPtr;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ const char* btStridingMeshInterface::serialize(void* dataBuffer, btSerializer* s
|
||||
int numindices = numtriangles*3;
|
||||
if (numindices)
|
||||
{
|
||||
btChunk* chunk = serializer->allocate(sizeof(btIntIndexData),numindices);
|
||||
btChunk* chunk = serializer->allocate(sizeof(btShortIntIndexData),numindices);
|
||||
btShortIntIndexData* tmpIndices = (btShortIntIndexData*)chunk->m_oldPtr;
|
||||
memPtr->m_indices16 = tmpIndices;
|
||||
for (gfxindex=0;gfxindex<numtriangles;gfxindex++)
|
||||
|
||||
Reference in New Issue
Block a user