Force-enable hasWater() for exterior cells (Fixes #3222)

This commit is contained in:
scrawl 2016-03-02 17:02:30 +01:00
parent 563807ee53
commit 3d6323f13a
2 changed files with 2 additions and 2 deletions

View file

@ -2039,7 +2039,7 @@ namespace MWWorld
bool World::isUnderwater(const MWWorld::CellStore* cell, const osg::Vec3f &pos) const bool World::isUnderwater(const MWWorld::CellStore* cell, const osg::Vec3f &pos) const
{ {
if (!(cell->getCell()->mData.mFlags & ESM::Cell::HasWater)) { if (!(cell->getCell()->hasWater())) {
return false; return false;
} }
return pos.z() < cell->getWaterLevel(); return pos.z() < cell->getWaterLevel();

View file

@ -141,7 +141,7 @@ struct Cell
bool hasWater() const bool hasWater() const
{ {
return (mData.mFlags&HasWater) != 0; return ((mData.mFlags&HasWater) != 0) || isExterior();
} }
// Restore the given reader to the stored position. Will try to open // Restore the given reader to the stored position. Will try to open