[IGfxWorld] Map smodel index pointers

This commit is contained in:
momo5502 2017-03-19 02:09:05 +01:00
parent df59a4089e
commit 3ca58dd4ce

View File

@ -230,8 +230,20 @@ namespace Assets
Game::GfxAabbTree* aabbTree = &cellTree->aabbTree[j];
if (aabbTree->smodelIndexes)
{
void* oldPointer = aabbTree->smodelIndexes;
if(builder->getAllocator()->isPointerMapped(oldPointer))
{
// We still have to read it
reader.readArray<unsigned short>(aabbTree->smodelIndexCount);
aabbTree->smodelIndexes = builder->getAllocator()->getPointer<unsigned short>(oldPointer);
}
else
{
aabbTree->smodelIndexes = reader.readArray<unsigned short>(aabbTree->smodelIndexCount);
builder->getAllocator()->mapPointer(oldPointer, aabbTree->smodelIndexes);
}
}
}
}