mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-20 12:11:32 +00:00
Merge branch 'SpeedUpInteriorCheck' into 'master'
Speedup searching for exterior cells See merge request OpenMW/openmw!857
This commit is contained in:
commit
b7886bc036
1 changed files with 1 additions and 1 deletions
|
@ -895,7 +895,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.
|
// 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.
|
// 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.
|
// 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
|
// Try to overwrite existing record
|
||||||
if (interior)
|
if (interior)
|
||||||
|
|
Loading…
Reference in a new issue