mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-04 07:47:59 +03:00
Merge branch 'master' into 'OpenCS_Bug6017'
This commit is contained in:
commit
f68c81e631
188 changed files with 1366 additions and 1209 deletions
|
@ -72,10 +72,7 @@ void ESM::CellRef::loadData(ESMReader &esm, bool &isDeleted, int *tempRefCount)
|
|||
break;
|
||||
case ESM::FourCC<'X','S','C','L'>::value:
|
||||
esm.getHT(mScale);
|
||||
if (mScale < 0.5)
|
||||
mScale = 0.5;
|
||||
else if (mScale > 2)
|
||||
mScale = 2;
|
||||
mScale = std::clamp(mScale, 0.5f, 2.0f);
|
||||
break;
|
||||
case ESM::FourCC<'A','N','A','M'>::value:
|
||||
mOwner = esm.getHString();
|
||||
|
@ -162,12 +159,7 @@ void ESM::CellRef::save (ESMWriter &esm, bool wideRefNum, bool inInventory, bool
|
|||
}
|
||||
|
||||
if (mScale != 1.0) {
|
||||
float scale = mScale;
|
||||
if (scale < 0.5)
|
||||
scale = 0.5;
|
||||
else if (scale > 2)
|
||||
scale = 2;
|
||||
esm.writeHNT("XSCL", scale);
|
||||
esm.writeHNT("XSCL", std::clamp(mScale, 0.5f, 2.0f));
|
||||
}
|
||||
|
||||
if (!inInventory)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue