mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 22:45:38 +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:
commit
5f6ca2a6d1
1 changed files with 1 additions and 1 deletions
|
@ -550,7 +550,7 @@ namespace MWWorld
|
||||||
for (auto iter = mActiveCells.begin(); iter != mActiveCells.end();)
|
for (auto iter = mActiveCells.begin(); iter != mActiveCells.end();)
|
||||||
{
|
{
|
||||||
auto* cell = *iter++;
|
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 dx = std::abs(playerCellX - cell->getCell()->getGridX());
|
||||||
const auto dy = std::abs(playerCellY - cell->getCell()->getGridY());
|
const auto dy = std::abs(playerCellY - cell->getCell()->getGridY());
|
||||||
|
|
Loading…
Reference in a new issue