mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-03 13:45:34 +00:00
Merge pull request #2368 from Capostrophic/teleport
Avoid using null pointer for player's cell in moveObjectImp
This commit is contained in:
commit
30ea2a2063
1 changed files with 1 additions and 1 deletions
|
@ -1306,7 +1306,7 @@ namespace MWWorld
|
|||
|
||||
CellStore* cell = ptr.getCell();
|
||||
CellStore* newCell = getExterior(cellX, cellY);
|
||||
bool isCellActive = getPlayerPtr().getCell()->isExterior() && mWorldScene->isCellActive(*newCell);
|
||||
bool isCellActive = getPlayerPtr().isInCell() && getPlayerPtr().getCell()->isExterior() && mWorldScene->isCellActive(*newCell);
|
||||
|
||||
if (cell->isExterior() || (moveToActive && isCellActive && ptr.getClass().isActor()))
|
||||
cell = newCell;
|
||||
|
|
Loading…
Reference in a new issue