From 3406baca4d3ff60a7bd5d3ccef009627d8ffee0b Mon Sep 17 00:00:00 2001 From: momo5502 Date: Mon, 26 Dec 2016 02:27:54 +0100 Subject: [PATCH] [IGfxWorld] Fix portal importing --- src/Components/Modules/AssetInterfaces/IGfxWorld.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Components/Modules/AssetInterfaces/IGfxWorld.cpp b/src/Components/Modules/AssetInterfaces/IGfxWorld.cpp index 2d8b393e..b3f82e9d 100644 --- a/src/Components/Modules/AssetInterfaces/IGfxWorld.cpp +++ b/src/Components/Modules/AssetInterfaces/IGfxWorld.cpp @@ -81,7 +81,10 @@ namespace Assets for (int j = 0; j < cell->portalCount; ++j) { - cell->portals[i].vertices = reader.readArray(cell->portals[i].vertexCount); + if (cell->portals[j].vertices) + { + cell->portals[j].vertices = reader.readArray(cell->portals[j].vertexCount & 0xFF); + } } }