From d1c2a9d194d8a0526660a8edfc22755a0fdfc502 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sat, 5 Nov 2016 00:59:41 +0100 Subject: [PATCH] Correct dependency loading. --- src/Components/Modules/Maps.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/Components/Modules/Maps.cpp b/src/Components/Modules/Maps.cpp index 57d686a9..812cc4a2 100644 --- a/src/Components/Modules/Maps.cpp +++ b/src/Components/Modules/Maps.cpp @@ -31,7 +31,9 @@ namespace Components Utils::Memory::Allocator allocator; auto teams = Maps::GetTeamsForMap(Maps::CurrentMainZone); + auto dependencies = Maps::GetDependenciesForMap(Maps::CurrentMainZone); + Utils::Merge(&Maps::CurrentDependencies, dependencies.data(), dependencies.size()); std::vector data; Utils::Merge(&data, zoneInfo, zoneCount); @@ -46,17 +48,6 @@ namespace Components team.name = allocator.DuplicateString(fmt::sprintf("iw4x_team_%s", teams.second.data())); data.push_back(team); - for (auto& depdendency : dependencies) - { - Game::XZoneInfo info; - - info.name = depdendency.data(); - info.allocFlags = zoneInfo->allocFlags; - info.freeFlags = zoneInfo->freeFlags; - - data.push_back(info); - } - for (unsigned int i = 0; i < Maps::CurrentDependencies.size(); ++i) { Game::XZoneInfo info;