[IGfxWorld] Map smodel index pointers
This commit is contained in:
parent
df59a4089e
commit
3ca58dd4ce
@ -231,7 +231,19 @@ namespace Assets
|
||||
|
||||
if (aabbTree->smodelIndexes)
|
||||
{
|
||||
aabbTree->smodelIndexes = reader.readArray<unsigned short>(aabbTree->smodelIndexCount);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user