forked from teamnwah/openmw-tes3coop
various minor fixes
This commit is contained in:
parent
09ec60fe2a
commit
584a7a66b9
1 changed files with 17 additions and 14 deletions
|
@ -124,7 +124,7 @@ void CSMTools::ListLandTexturesMergeStage::perform (int stage, CSMDoc::Messages&
|
||||||
|
|
||||||
if (!record.isDeleted())
|
if (!record.isDeleted())
|
||||||
{
|
{
|
||||||
const ESM::Land& land = record.get();
|
const CSMWorld::Land& land = record.get();
|
||||||
|
|
||||||
// make sure record is loaded
|
// make sure record is loaded
|
||||||
land.loadData (ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML |
|
land.loadData (ESM::Land::DATA_VHGT | ESM::Land::DATA_VNML |
|
||||||
|
@ -228,22 +228,25 @@ void CSMTools::MergeLandStage::perform (int stage, CSMDoc::Messages& messages)
|
||||||
// because record is already fully loaded)
|
// because record is already fully loaded)
|
||||||
newLand.mPlugin = 0;
|
newLand.mPlugin = 0;
|
||||||
|
|
||||||
// adjust land texture references
|
if (land.mDataTypes & ESM::Land::DATA_VTEX)
|
||||||
if (ESM::Land::LandData *data = newLand.getLandData())
|
|
||||||
{
|
{
|
||||||
std::pair<uint16_t, int> key;
|
// adjust land texture references
|
||||||
key.second = land.mPlugin;
|
if (ESM::Land::LandData *data = newLand.getLandData())
|
||||||
|
|
||||||
for (int i=0; i<ESM::Land::LAND_NUM_TEXTURES; ++i)
|
|
||||||
{
|
{
|
||||||
key.first = data->mTextures[i];
|
std::pair<uint16_t, int> key;
|
||||||
std::map<std::pair<uint16_t, int>, int>::const_iterator iter =
|
key.second = land.mPlugin;
|
||||||
mState.mTextureIndices.find (key);
|
|
||||||
|
|
||||||
if (iter!=mState.mTextureIndices.end())
|
for (int i=0; i<ESM::Land::LAND_NUM_TEXTURES; ++i)
|
||||||
data->mTextures[i] = iter->second;
|
{
|
||||||
else
|
key.first = data->mTextures[i];
|
||||||
data->mTextures[i] = 0;
|
std::map<std::pair<uint16_t, int>, int>::const_iterator iter =
|
||||||
|
mState.mTextureIndices.find (key);
|
||||||
|
|
||||||
|
if (iter!=mState.mTextureIndices.end())
|
||||||
|
data->mTextures[i] = iter->second;
|
||||||
|
else
|
||||||
|
data->mTextures[i] = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue