1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-26 09:35:28 +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());