mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-16 08:42:23 +00:00
Fix(editor): Don't save dirty water height values
This commit is contained in:
parent
35f547ad7c
commit
1b431bf633
@ -190,25 +190,15 @@ namespace ESM
|
|||||||
|
|
||||||
if (mData.mFlags & Interior)
|
if (mData.mFlags & Interior)
|
||||||
{
|
{
|
||||||
if (mWaterInt)
|
// Try to avoid saving ambient information when it's unnecessary.
|
||||||
{
|
// This is to fix black lighting and flooded water
|
||||||
int32_t water = (mWater >= 0) ? static_cast<int32_t>(mWater + 0.5) : static_cast<int32_t>(mWater - 0.5);
|
// in resaved cell records that lack this information.
|
||||||
esm.writeHNT("INTV", water);
|
if (mWaterInt && mWater != 0)
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
esm.writeHNT("WHGT", mWater);
|
esm.writeHNT("WHGT", mWater);
|
||||||
}
|
|
||||||
|
|
||||||
if (mData.mFlags & QuasiEx)
|
if (mData.mFlags & QuasiEx)
|
||||||
esm.writeHNOCRefId("RGNN", mRegion);
|
esm.writeHNOCRefId("RGNN", mRegion);
|
||||||
else
|
else if (mHasAmbi)
|
||||||
{
|
esm.writeHNT("AMBI", mAmbi, 16);
|
||||||
// Try to avoid saving ambient lighting information when it's unnecessary.
|
|
||||||
// This is to fix black lighting in resaved cell records that lack this information.
|
|
||||||
if (mHasAmbi)
|
|
||||||
esm.writeHNT("AMBI", mAmbi, 16);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user