1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-30 09:45:36 +00:00

Merge branch 'fix_worldspaces' into 'master'

Bugfix: Unload active cells when teleporting to another exterior worldspace

See merge request OpenMW/openmw!3028
This commit is contained in:
Alexei Kotov 2023-05-19 14:20:42 +00:00
commit 5f6ca2a6d1

View file

@ -550,7 +550,7 @@ namespace MWWorld
for (auto iter = mActiveCells.begin(); iter != mActiveCells.end();)
{
auto* cell = *iter++;
if (cell->getCell()->isExterior())
if (cell->getCell()->isExterior() && cell->getCell()->getWorldSpace() == playerCellIndex.mWorldspace)
{
const auto dx = std::abs(playerCellX - cell->getCell()->getGridX());
const auto dy = std::abs(playerCellY - cell->getCell()->getGridY());