|
|
|
@ -118,7 +118,7 @@ namespace ESM
|
|
|
|
|
bool overriding = !mName.empty();
|
|
|
|
|
bool isLoaded = false;
|
|
|
|
|
mHasAmbi = false;
|
|
|
|
|
mHasWater = false;
|
|
|
|
|
mHasWaterHeightSub = false;
|
|
|
|
|
while (!isLoaded && esm.hasMoreSubs())
|
|
|
|
|
{
|
|
|
|
|
esm.getSubName();
|
|
|
|
@ -132,7 +132,7 @@ namespace ESM
|
|
|
|
|
case fourCC("WHGT"):
|
|
|
|
|
float waterLevel;
|
|
|
|
|
esm.getHT(waterLevel);
|
|
|
|
|
mHasWater = true;
|
|
|
|
|
mHasWaterHeightSub = true;
|
|
|
|
|
if (!std::isfinite(waterLevel))
|
|
|
|
|
{
|
|
|
|
|
if (!overriding)
|
|
|
|
@ -193,7 +193,7 @@ namespace ESM
|
|
|
|
|
// Try to avoid saving ambient information when it's unnecessary.
|
|
|
|
|
// This is to fix black lighting and flooded water
|
|
|
|
|
// in resaved cell records that lack this information.
|
|
|
|
|
if (mHasWater)
|
|
|
|
|
if (mHasWaterHeightSub)
|
|
|
|
|
esm.writeHNT("WHGT", mWater);
|
|
|
|
|
if (mData.mFlags & QuasiEx)
|
|
|
|
|
esm.writeHNOCRefId("RGNN", mRegion);
|
|
|
|
@ -322,7 +322,7 @@ namespace ESM
|
|
|
|
|
mData.mY = 0;
|
|
|
|
|
|
|
|
|
|
mHasAmbi = true;
|
|
|
|
|
mHasWater = true;
|
|
|
|
|
mHasWaterHeightSub = true;
|
|
|
|
|
mAmbi.mAmbient = 0;
|
|
|
|
|
mAmbi.mSunlight = 0;
|
|
|
|
|
mAmbi.mFog = 0;
|
|
|
|
|