1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-16 18:19:55 +00:00

Merge pull request #1485 from akortunov/master

Fix a failed assert in the getCell() check during a new game start
This commit is contained in:
scrawl 2017-09-29 22:53:10 +00:00 committed by GitHub
commit 841990fcdb

View file

@ -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