mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-06 19:01:21 +03:00
parent
fa4718283d
commit
b95748d044
14 changed files with 87 additions and 47 deletions
|
@ -24,9 +24,9 @@ void ESM::ObjectState::load (ESMReader &esm)
|
|||
|
||||
esm.getHNOT (mLocalRotation, "LROT", 12);
|
||||
|
||||
// obsolete
|
||||
int unused;
|
||||
esm.getHNOT(unused, "LTIM");
|
||||
// used for lights only
|
||||
mTime = 0;
|
||||
esm.getHNOT (mTime, "LTIM");
|
||||
|
||||
// FIXME: assuming "false" as default would make more sense, but also break compatibility with older save files
|
||||
mHasCustomState = true;
|
||||
|
@ -55,6 +55,9 @@ void ESM::ObjectState::save (ESMWriter &esm, bool inInventory) const
|
|||
esm.writeHNT ("LROT", mLocalRotation, 12);
|
||||
}
|
||||
|
||||
if (mTime)
|
||||
esm.writeHNT ("LTIM", mTime);
|
||||
|
||||
if (!mHasCustomState)
|
||||
esm.writeHNT ("HCUS", false);
|
||||
}
|
||||
|
@ -71,6 +74,7 @@ void ESM::ObjectState::blank()
|
|||
mPosition.rot[i] = 0;
|
||||
mLocalRotation[i] = 0;
|
||||
}
|
||||
mTime = 0;
|
||||
mHasCustomState = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue