diff --git a/apps/opencs/model/world/idtable.cpp b/apps/opencs/model/world/idtable.cpp index 69ac8a42b6..8409402dd3 100644 --- a/apps/opencs/model/world/idtable.cpp +++ b/apps/opencs/model/world/idtable.cpp @@ -384,15 +384,20 @@ CSMWorld::LandTextureIdTable::ImportResults CSMWorld::LandTextureIdTable::import const ESM::RefId refId = ESM::RefId::stringRefId(id); const int oldRow = idCollection()->searchId(refId); - // If it does not exist or it is in the current plugin, it can be skipped. - if (oldRow < 0 || plugin == 0) + // If it does not exist, it can be skipped. + if (oldRow < 0) { results.recordMapping.emplace_back(id, id); continue; } - // Look for a pre-existing record auto& record = static_cast&>(idCollection()->getRecord(oldRow)); + // If it is in the current plugin, it can be skipped. + if (record.mState == Record::State_ModifiedOnly) + { + results.recordMapping.emplace_back(id, id); + continue; + } std::string texture = Misc::StringUtils::lowerCase(record.get().mTexture); auto searchIt = reverseLookupMap.find(texture); if (searchIt != reverseLookupMap.end())