From a9ecaf139febe5c94976f0c7302e2cf0c30e374a Mon Sep 17 00:00:00 2001 From: momo5502 Date: Wed, 3 Feb 2016 12:20:21 +0100 Subject: [PATCH] Allow loading up to 10 maps simultaneously (for zone building!) --- src/Components/Modules/Maps.cpp | 8 ++++---- src/Components/Modules/ZoneBuilder.cpp | 9 ++++++++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/Components/Modules/Maps.cpp b/src/Components/Modules/Maps.cpp index 8634b925..b7bdb75e 100644 --- a/src/Components/Modules/Maps.cpp +++ b/src/Components/Modules/Maps.cpp @@ -182,10 +182,10 @@ namespace Components Maps::ReallocateEntryPool(); // Dependencies - Maps::AddDependency("oilrig", "mp_subbase"); - Maps::AddDependency("gulag", "mp_subbase"); - Maps::AddDependency("invasion", "mp_rust"); - //Maps::AddDependency("^(?!mp_).*", "mp_subbase"); // All maps not starting with "mp_" + //Maps::AddDependency("oilrig", "mp_subbase"); + //Maps::AddDependency("gulag", "mp_subbase"); + //Maps::AddDependency("invasion", "mp_rust"); + Maps::AddDependency("^(?!mp_).*", "dependencies_mp"); // All maps not starting with "mp_" } Maps::~Maps() diff --git a/src/Components/Modules/ZoneBuilder.cpp b/src/Components/Modules/ZoneBuilder.cpp index a48d3777..ce7d0c30 100644 --- a/src/Components/Modules/ZoneBuilder.cpp +++ b/src/Components/Modules/ZoneBuilder.cpp @@ -58,7 +58,7 @@ namespace Components { std::string fastfile = DataMap.GetElementAt(i, 1); - Logger::Print("Loading '%s'...\n", fastfile.c_str()); + //Logger::Print("Loading '%s'...\n", fastfile.c_str()); //if (!DB_IsZoneLoaded(fastfile.c_str())) { @@ -486,6 +486,13 @@ namespace Components // Don't create default assets Utils::Hook::Set(0x407BAA, 0xEB); + // Increase asset pools + Game::ReallocateAssetPool(Game::XAssetType::ASSET_TYPE_MAP_ENTS, 10); + + // hunk size (was 300 MiB) + Utils::Hook::Set(0x64A029, 0x38400000); // 900 MiB + Utils::Hook::Set(0x64A057, 0x38400000); + Command::Add("buildzone", [] (Command::Params params) { if (params.Length() < 2) return;