some fixes to record structs

actorid
Marc Zinnschlag 11 years ago
parent 8c5f313546
commit d8d4f1a15e

@ -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);

@ -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();
};

@ -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)
{

@ -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)
{

Loading…
Cancel
Save