1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:23:52 +00:00

some fixes to record structs

This commit is contained in:
Marc Zinnschlag 2014-01-16 12:02:45 +01:00
parent 8c5f313546
commit d8d4f1a15e
4 changed files with 8 additions and 5 deletions

View file

@ -71,9 +71,12 @@ void ESM::CellRef::load (ESMReader& esm, bool wideRefNum)
esm.getHT (mNam0);
}
void ESM::CellRef::save(ESMWriter &esm) const
void ESM::CellRef::save (ESMWriter &esm, bool wideRefNum) const
{
esm.writeHNT("FRMR", mRefNum.mIndex);
if (wideRefNum)
esm.writeHNT ("FRMR", mRefNum, 8);
else
esm.writeHNT ("FRMR", mRefNum.mIndex, 4);
esm.writeHNCString("NAME", mRefID);

View file

@ -89,7 +89,7 @@ namespace ESM
void load (ESMReader& esm, bool wideRefNum = false);
void save(ESMWriter &esm) const;
void save(ESMWriter &esm, bool wideRefNum = false) const;
void blank();
};

View file

@ -230,7 +230,7 @@ bool Cell::getNextMVRF(ESMReader &esm, MovedCellRef &mref)
{
CellId id;
id.mPaged = (mData.mFlags & Interior);
id.mPaged = !(mData.mFlags & Interior);
if (id.mPaged)
{

View file

@ -27,7 +27,7 @@ void ESM::ObjectState::load (ESMReader &esm)
void ESM::ObjectState::save (ESMWriter &esm) const
{
mRef.save (esm);
mRef.save (esm, true);
if (mHasLocals)
{