Fix not straight up inserting scriptstrings on loading from zone

This commit is contained in:
Jan
2021-03-23 00:42:41 +01:00
parent 4380a6c9f2
commit 5fbcbaf3c7
3 changed files with 13 additions and 5 deletions

View File

@ -89,7 +89,7 @@ XAssetInfoGeneric* AssetLoadingManager::LoadAssetDependency(const asset_type_t a
// 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]);
m_context.m_zone->m_script_strings.AddOrGetScriptString(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;