1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-04 03:40:14 +00:00

Fix uninitialized mWaterLevel in esm4/loadwrld.cpp

This commit is contained in:
Petr Mikheev 2023-05-18 01:56:29 +02:00
parent 493858127a
commit 61232f4b75

View File

@ -192,11 +192,19 @@ void ESM4::World::load(ESM4::Reader& reader)
throw std::runtime_error("ESM4::WRLD::load - Unknown subrecord " + ESM::printName(subHdr.typeId)); throw std::runtime_error("ESM4::WRLD::load - Unknown subrecord " + ESM::printName(subHdr.typeId));
} }
if (isTES5 && usingDefaultLevels) if (usingDefaultLevels)
{
if (isTES5)
{ {
mLandLevel = -2700.f; mLandLevel = -2700.f;
mWaterLevel = -14000.f; mWaterLevel = -14000.f;
} }
else
{
mLandLevel = 0.f; // FIXME: not sure that this value is correct
mWaterLevel = 0.f;
}
}
} }
} }