mirror of
https://github.com/OpenMW/openmw.git
synced 2025-06-04 13:11:31 +00:00
handle missing land texture records properly during merge
This commit is contained in:
parent
73f6efddcc
commit
09ec60fe2a
1 changed files with 28 additions and 21 deletions
|
@ -164,6 +164,10 @@ void CSMTools::MergeLandTexturesStage::perform (int stage, CSMDoc::Messages& mes
|
||||||
if (stage==0)
|
if (stage==0)
|
||||||
mNext = mState.mTextureIndices.begin();
|
mNext = mState.mTextureIndices.begin();
|
||||||
|
|
||||||
|
bool found = false;
|
||||||
|
|
||||||
|
do
|
||||||
|
{
|
||||||
if (mNext==mState.mTextureIndices.end())
|
if (mNext==mState.mTextureIndices.end())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -189,10 +193,13 @@ void CSMTools::MergeLandTexturesStage::perform (int stage, CSMDoc::Messages& mes
|
||||||
CSMWorld::RecordBase::State_ModifiedOnly, 0, &texture);
|
CSMWorld::RecordBase::State_ModifiedOnly, 0, &texture);
|
||||||
|
|
||||||
mState.mTarget->getData().getLandTextures().appendRecord (newRecord);
|
mState.mTarget->getData().getLandTextures().appendRecord (newRecord);
|
||||||
|
|
||||||
|
found = true;
|
||||||
}
|
}
|
||||||
/// \todo deal with missing textures (either abort merge or report and make sure OpenMW can deal with missing textures)
|
|
||||||
|
|
||||||
++mNext;
|
++mNext;
|
||||||
|
}
|
||||||
|
while (!found);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue