1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-03-29 22:20:33 +00:00

Restore OpGetWaterLevel to vanilla behaviour

This commit is contained in:
scrawl 2015-12-03 15:48:27 +01:00
parent d0c6b407b4
commit 389b168d5f

View File

@ -144,7 +144,9 @@ namespace MWScript
return;
}
MWWorld::CellStore *cell = MWMechanics::getPlayer().getCell();
if (cell->getCell()->hasWater())
if (cell->isExterior())
runtime.push(0.f); // vanilla oddity, return 0 even though water is actually at -1
else if (cell->getCell()->hasWater())
runtime.push (cell->getWaterLevel());
else
runtime.push (-std::numeric_limits<float>::max());