Add scriptstrings from loaded zones to newly linked zone

This commit is contained in:
Jan
2021-03-18 20:03:00 +01:00
parent 2a6d7c84c2
commit 5443ed4261
5 changed files with 19 additions and 14 deletions

View File

@ -86,6 +86,11 @@ XAssetInfoGeneric* AssetLoadingManager::LoadAssetDependency(const asset_type_t a
return nullptr;
}
// Make sure any used script string is available in the created zone
// The replacement of the scr_string_t values will be done upon writing
for(auto scrString : existingAsset->m_used_script_strings)
m_context.m_zone->m_script_strings.AddScriptString(existingAsset->m_zone->m_script_strings[scrString]);
AddAsset(existingAsset->m_type, existingAsset->m_name, existingAsset->m_ptr, std::move(dependencies), existingAsset->m_used_script_strings, existingAsset->m_zone);
auto* lastDependency = m_last_dependency_loaded;
m_last_dependency_loaded = nullptr;