mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-28 07:32:00 -04:00
Avoid using null pointer for player's cell in moveObjectImp
This commit is contained in:
parent
8754db2898
commit
458c0bba41
@ -1306,7 +1306,7 @@ namespace MWWorld
|
|||||||
|
|
||||||
CellStore* cell = ptr.getCell();
|
CellStore* cell = ptr.getCell();
|
||||||
CellStore* newCell = getExterior(cellX, cellY);
|
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()))
|
if (cell->isExterior() || (moveToActive && isCellActive && ptr.getClass().isActor()))
|
||||||
cell = newCell;
|
cell = newCell;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user