1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-21 07:23:54 +00:00

Fix saving land data.

This commit is contained in:
cc9cii 2015-03-13 22:06:55 +11:00
parent 589b0b9171
commit 488bc76da5
3 changed files with 4 additions and 2 deletions

View file

@ -376,6 +376,8 @@ void CSMDoc::WriteLandCollectionStage::perform (int stage, Messages& messages)
mState.getWriter().startRecord (record.mLand->sRecordId); mState.getWriter().startRecord (record.mLand->sRecordId);
record.mLand->save (mState.getWriter()); record.mLand->save (mState.getWriter());
if(record.mLand->mLandData)
record.mLand->mLandData->save (mState.getWriter());
mState.getWriter().endRecord (record.mLand->sRecordId); mState.getWriter().endRecord (record.mLand->sRecordId);
} }

View file

@ -745,7 +745,7 @@ bool CSMWorld::Data::continueLoading (CSMDoc::Messages& messages)
if (index!=-1 && !mBase) if (index!=-1 && !mBase)
mLand.getRecord (index).mModified.mLand->loadData ( mLand.getRecord (index).mModified.mLand->loadData (
ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML | ESM::Land::DATA_VCLR | ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML | ESM::Land::DATA_VCLR |
ESM::Land::DATA_VTEX); ESM::Land::DATA_VTEX | ESM::Land::DATA_WNAM);
break; break;
} }

View file

@ -11,7 +11,7 @@ namespace ESM
void Land::LandData::save(ESMWriter &esm) void Land::LandData::save(ESMWriter &esm)
{ {
if (mDataTypes & Land::DATA_VNML) { if (mDataTypes & Land::DATA_VNML) {
esm.writeHNT("VNML", mNormals, sizeof(VNML)); esm.writeHNT("VNML", mNormals, sizeof(mNormals));
} }
if (mDataTypes & Land::DATA_VHGT) { if (mDataTypes & Land::DATA_VHGT) {
VHGT offsets; VHGT offsets;