From ccaa581f39ec0bc075198ce2b3b1311c255dda64 Mon Sep 17 00:00:00 2001 From: CedricMocquillon Date: Thu, 13 May 2021 22:29:52 +0200 Subject: [PATCH] According to the comment, an interior cell must have (0,0) but as there is an exterior cell with these coordinates it is not sufficient but it is necessary so I added it --- apps/openmw/mwworld/store.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/openmw/mwworld/store.cpp b/apps/openmw/mwworld/store.cpp index fb66b0a1d7..edfc939b1b 100644 --- a/apps/openmw/mwworld/store.cpp +++ b/apps/openmw/mwworld/store.cpp @@ -913,7 +913,7 @@ namespace MWWorld // mX and mY will be (0,0) for interior cells, but there is also an exterior cell with the coordinates of (0,0), so that doesn't help. // Check whether mCell is an interior cell. This isn't perfect, will break if a Region with the same name as an interior cell is created. // A proper fix should be made for future versions of the file format. - bool interior = mCells->search(pathgrid.mCell) != nullptr; + bool interior = pathgrid.mData.mX == 0 && pathgrid.mData.mY == 0 && mCells->search(pathgrid.mCell) != nullptr; // Try to overwrite existing record if (interior)