Allow loading up to 10 maps simultaneously (for zone building!)

This commit is contained in:
momo5502 2016-02-03 12:20:21 +01:00
parent 2a29232a6f
commit a9ecaf139f
2 changed files with 12 additions and 5 deletions

View File

@ -182,10 +182,10 @@ namespace Components
Maps::ReallocateEntryPool(); Maps::ReallocateEntryPool();
// Dependencies // Dependencies
Maps::AddDependency("oilrig", "mp_subbase"); //Maps::AddDependency("oilrig", "mp_subbase");
Maps::AddDependency("gulag", "mp_subbase"); //Maps::AddDependency("gulag", "mp_subbase");
Maps::AddDependency("invasion", "mp_rust"); //Maps::AddDependency("invasion", "mp_rust");
//Maps::AddDependency("^(?!mp_).*", "mp_subbase"); // All maps not starting with "mp_" Maps::AddDependency("^(?!mp_).*", "dependencies_mp"); // All maps not starting with "mp_"
} }
Maps::~Maps() Maps::~Maps()

View File

@ -58,7 +58,7 @@ namespace Components
{ {
std::string fastfile = DataMap.GetElementAt(i, 1); 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())) //if (!DB_IsZoneLoaded(fastfile.c_str()))
{ {
@ -486,6 +486,13 @@ namespace Components
// Don't create default assets // Don't create default assets
Utils::Hook::Set<BYTE>(0x407BAA, 0xEB); Utils::Hook::Set<BYTE>(0x407BAA, 0xEB);
// Increase asset pools
Game::ReallocateAssetPool(Game::XAssetType::ASSET_TYPE_MAP_ENTS, 10);
// hunk size (was 300 MiB)
Utils::Hook::Set<DWORD>(0x64A029, 0x38400000); // 900 MiB
Utils::Hook::Set<DWORD>(0x64A057, 0x38400000);
Command::Add("buildzone", [] (Command::Params params) Command::Add("buildzone", [] (Command::Params params)
{ {
if (params.Length() < 2) return; if (params.Length() < 2) return;