1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-25 03:40:40 +00:00

Use sDefaultWorldspaceId as fallback worldspace for PositionCell command

store is nullptr at this point because there was no cell found.
This commit is contained in:
elsid 2023-05-28 14:25:44 +02:00
parent 16a580eb21
commit 06af4cb56a
No known key found for this signature in database
GPG Key ID: 4DE04C198CBA7625

View File

@ -417,9 +417,8 @@ namespace MWScript
Log(Debug::Warning) << error; Log(Debug::Warning) << error;
if (!isPlayer) if (!isPlayer)
return; return;
const ESM::ExteriorCellLocation cellIndex store = &worldModel->getExterior(
= ESM::positionToExteriorCellLocation(x, y, store->getCell()->getWorldSpace()); ESM::positionToExteriorCellLocation(x, y, ESM::Cell::sDefaultWorldspaceId));
store = &worldModel->getExterior(cellIndex);
} }
if (store) if (store)
{ {