mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-10 14:58:10 -05:00
Save scriptstrings per zone and not per asset since that solves all problems with multiple assets of the same zone referencing the same struct in memory that has scriptstring indices
This commit is contained in:
@ -81,7 +81,7 @@ public:
|
||||
m_capacity = 0;
|
||||
}
|
||||
|
||||
XAssetInfo<T>* AddAsset(std::string name, T* asset, std::vector<std::string>& scriptStrings, std::vector<XAssetInfoGeneric*>& dependencies) override
|
||||
XAssetInfo<T>* AddAsset(std::string name, T* asset, Zone* zone, std::vector<XAssetInfoGeneric*>& dependencies) override
|
||||
{
|
||||
if(m_free == nullptr)
|
||||
{
|
||||
@ -96,7 +96,7 @@ public:
|
||||
poolSlot->m_info->m_type = m_type;
|
||||
poolSlot->m_info->m_name = std::move(name);
|
||||
poolSlot->m_info->m_ptr = &poolSlot->m_entry;
|
||||
poolSlot->m_info->m_script_strings = std::move(scriptStrings);
|
||||
poolSlot->m_info->m_zone = zone;
|
||||
poolSlot->m_info->m_dependencies = std::move(dependencies);
|
||||
|
||||
m_asset_lookup[poolSlot->m_info->m_name] = poolSlot->m_info;
|
||||
|
Reference in New Issue
Block a user