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

openmw-36
scrawl 10 years ago
parent c819180aa1
commit 97c35da441

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

Loading…
Cancel
Save