diff --git a/src/Components/Modules/ZoneBuilder.cpp b/src/Components/Modules/ZoneBuilder.cpp index f4e0c2aa..4b39de2f 100644 --- a/src/Components/Modules/ZoneBuilder.cpp +++ b/src/Components/Modules/ZoneBuilder.cpp @@ -283,7 +283,15 @@ namespace Components asset.header.data = ptr; asset.type = type; + const auto& cmp = asset.header.data; + + if(std::find_if(this->markedAssets.begin(), this->markedAssets.end(), [&cmp] (const Game::XAsset& s) { return cmp == s.header.data; } ) != this->markedAssets.end()) + { + return; // don't re-mark assets + } + AssetHandler::ZoneMark(asset, this); + this->markedAssets.push_back(asset); } void ZoneBuilder::Zone::writeZone() diff --git a/src/Components/Modules/ZoneBuilder.hpp b/src/Components/Modules/ZoneBuilder.hpp index b16b461c..63c0d308 100644 --- a/src/Components/Modules/ZoneBuilder.hpp +++ b/src/Components/Modules/ZoneBuilder.hpp @@ -75,11 +75,11 @@ namespace Components std::vector loadedAssets; std::vector savedAssets; + std::vector markedAssets; std::vector scriptStrings; std::map scriptStringMap; std::map renameMap[Game::XAssetType::ASSET_TYPE_COUNT]; std::map pointerMap; - std::vector aliasBaseStack; std::map aliasMap; Game::RawFile branding;