Fix isUnderwater checks being off by one for exterior cells

openmw-38
scrawl 9 years ago
parent 86881bcf39
commit d0c6b407b4

@ -296,6 +296,8 @@ namespace MWWorld
float CellStore::getWaterLevel() const
{
if (isExterior())
return -1;
return mWaterLevel;
}

@ -265,7 +265,7 @@ namespace MWWorld
mRendering.addCell(cell);
bool waterEnabled = cell->getCell()->hasWater() || cell->isExterior();
float waterLevel = cell->isExterior() ? -1.f : cell->getWaterLevel();
float waterLevel = cell->getWaterLevel();
mRendering.setWaterEnabled(waterEnabled);
if (waterEnabled)
{

Loading…
Cancel
Save