[IclipMap_t] Map cplane pointer

This commit is contained in:
momo5502 2017-03-17 23:41:50 +01:00
parent 39a5758955
commit 15a6f87057

View File

@ -635,7 +635,18 @@ namespace Assets
if (clipMap->numCPlanes) if (clipMap->numCPlanes)
{ {
void* oldPtr = reader.read<void*>();
clipMap->cPlanes = reader.readArray<Game::cplane_t>(clipMap->numCPlanes); clipMap->cPlanes = reader.readArray<Game::cplane_t>(clipMap->numCPlanes);
if (builder->getAllocator()->isPointerMapped(oldPtr))
{
clipMap->cPlanes = builder->getAllocator()->getPointer<Game::cplane_t>(oldPtr);
Components::Logger::Print("ClipMap dpvs planes already mapped. This shouldn't happen. Make sure to load the ClipMap before the GfxWorld!\n");
}
else
{
builder->getAllocator()->mapPointer(oldPtr, clipMap->cPlanes);
}
} }
if (clipMap->numStaticModels) if (clipMap->numStaticModels)