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:
Jan committed 2020-10-23 15:54:27 +02:00
1 parent f8e7a10789
commit eed7164b5b
36 files changed
+387 -447

No files matched your search

@@ -7,7 +7,7 @@ ContentPrinter::ContentPrinter(Zone* zone)
void ContentPrinter::PrintContent() const
{
const auto* pools = m_zone->GetPools();
const auto* pools = m_zone->m_pools.get();
printf("Zone '%s' (%s)\n", m_zone->m_name.c_str(), m_zone->m_game->GetName().c_str());
puts("Content:");
+1 -1
View File
@@ -15,7 +15,7 @@ namespace IW4
{
void WriteContent() const
{
const auto* pools = dynamic_cast<GameAssetPoolIW4*>(m_zone->GetPools());
const auto* pools = dynamic_cast<GameAssetPoolIW4*>(m_zone->m_pools.get());
assert(pools);
if (!pools)
+2 -2
View File
@@ -52,7 +52,7 @@ namespace T6
void WriteContent() const
{
const auto* pools = dynamic_cast<GameAssetPoolT6*>(m_zone->GetPools());
const auto* pools = dynamic_cast<GameAssetPoolT6*>(m_zone->m_pools.get());
assert(pools);
if (!pools)
@@ -91,7 +91,7 @@ namespace T6
WriteMetaData(META_DATA_KEY_GAME, "t6");
EmptyLine();
auto* assetPoolT6 = dynamic_cast<GameAssetPoolT6*>(m_zone->GetPools());
auto* assetPoolT6 = dynamic_cast<GameAssetPoolT6*>(m_zone->m_pools.get());
if (assetPoolT6 && !assetPoolT6->m_key_value_pairs->m_asset_lookup.empty())
{