1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-08 09:37:53 +00:00

Change exterior water level to z=-1 (Fixes #1405)

This commit is contained in:
scrawl 2015-05-10 15:34:07 +02:00
parent c819180aa1
commit 97c35da441

View File

@ -256,12 +256,13 @@ namespace MWWorld
insertCell (*cell, true, loadingListener);
mRendering.cellAdded (cell);
bool waterEnabled = cell->getCell()->hasWater();
bool waterEnabled = cell->getCell()->hasWater() || cell->isExterior();
mRendering.setWaterEnabled(waterEnabled);
float waterLevel = cell->isExterior() ? -1.f : cell->getWaterLevel();
if (waterEnabled)
{
mPhysics->enableWater(cell->getWaterLevel());
mRendering.setWaterHeight(cell->getWaterLevel());
mPhysics->enableWater(waterLevel);
mRendering.setWaterHeight(waterLevel);
}
else
mPhysics->disableWater();