forked from teamnwah/openmw-tes3coop
Fix a failed assert in the getCell() check during a new game start
This commit is contained in:
parent
5b10e3128e
commit
03daf2b9e3
1 changed files with 3 additions and 1 deletions
|
@ -2118,7 +2118,9 @@ namespace MWWorld
|
||||||
|
|
||||||
pos.z() += heightRatio*2*mPhysics->getRenderingHalfExtents(object).z();
|
pos.z() += heightRatio*2*mPhysics->getRenderingHalfExtents(object).z();
|
||||||
|
|
||||||
return isUnderwater(object.getCell(), pos);
|
const CellStore *currCell = object.isInCell() ? object.getCell() : NULL; // currCell == NULL should only happen for player, during initial startup
|
||||||
|
|
||||||
|
return isUnderwater(currCell, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool World::isUnderwater(const MWWorld::CellStore* cell, const osg::Vec3f &pos) const
|
bool World::isUnderwater(const MWWorld::CellStore* cell, const osg::Vec3f &pos) const
|
||||||
|
|
Loading…
Reference in a new issue