1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-02-28 13:09:42 +00:00

Unload active cells when teleporting to another exterior worldspace

This commit is contained in:
Petr Mikheev 2023-05-19 14:32:05 +02:00
parent 1ce35fa9e7
commit 690c752984

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());