mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-12 07:48:16 -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:
@ -26,7 +26,7 @@ bool ZoneDumper::DumpZone(Zone* zone, const std::string& basePath) const
|
||||
dumper.DumpPool(zone, assetPools->poolName.get(), basePath); \
|
||||
}
|
||||
|
||||
const auto* assetPools = dynamic_cast<GameAssetPoolIW4*>(zone->GetPools());
|
||||
const auto* assetPools = dynamic_cast<GameAssetPoolIW4*>(zone->m_pools.get());
|
||||
|
||||
// DUMP_ASSET_POOL(AssetDumperPhysPreset, m_phys_preset)
|
||||
// DUMP_ASSET_POOL(AssetDumperPhysCollmap, m_phys_collmap)
|
||||
|
@ -1450,7 +1450,7 @@ namespace T6
|
||||
std::stringstream ss;
|
||||
bool first = true;
|
||||
|
||||
for(auto i = 0u; i < _countof(WeaponFullDef::notetrackSoundMapKeys); i++)
|
||||
for (auto i = 0u; i < _countof(WeaponFullDef::notetrackSoundMapKeys); i++)
|
||||
{
|
||||
const auto& key = m_get_scr_string(keys[i]);
|
||||
const auto& value = m_get_scr_string(values[i]);
|
||||
@ -1634,10 +1634,11 @@ void AssetDumperWeapon::DumpAsset(Zone* zone, XAssetInfo<WeaponVariantDef>* asse
|
||||
|
||||
InfoStringFromWeaponConverter converter(fullDef, weapon_fields, _countof(weapon_fields), [asset](const scr_string_t scrStr) -> std::string
|
||||
{
|
||||
if (scrStr >= asset->m_script_strings.size())
|
||||
assert(scrStr < asset->m_zone->m_script_strings.size());
|
||||
if (scrStr >= asset->m_zone->m_script_strings.size())
|
||||
return "";
|
||||
|
||||
return asset->m_script_strings[scrStr];
|
||||
return asset->m_zone->m_script_strings[scrStr];
|
||||
});
|
||||
|
||||
const auto infoString = converter.Convert();
|
||||
|
@ -29,7 +29,7 @@ bool ZoneDumper::DumpZone(Zone* zone, const std::string& basePath) const
|
||||
dumper.DumpPool(zone, assetPools->poolName, basePath); \
|
||||
}
|
||||
|
||||
const auto assetPools = dynamic_cast<GameAssetPoolT6*>(zone->GetPools());
|
||||
const auto assetPools = dynamic_cast<GameAssetPoolT6*>(zone->m_pools.get());
|
||||
|
||||
// DUMP_ASSET_POOL(AssetDumperPhysPreset, m_phys_preset);
|
||||
// DUMP_ASSET_POOL(AssetDumperPhysConstraints, m_phys_constraints);
|
||||
|
Reference in New Issue
Block a user