From 90c646e6982e888c249aec1fb66e75f8829aad39 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Mon, 13 Feb 2017 19:40:53 +0100 Subject: [PATCH] [FastFiles] Add support for mod.ff --- src/Components/Modules/FastFiles.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Components/Modules/FastFiles.cpp b/src/Components/Modules/FastFiles.cpp index 2d9b09a8..118fc4a8 100644 --- a/src/Components/Modules/FastFiles.cpp +++ b/src/Components/Modules/FastFiles.cpp @@ -137,6 +137,11 @@ namespace Components data.push_back({ "iw4x_patch_mp", 1, 0 }); } + if (Utils::IO::FileExists(Dvar::Var("fs_game").get() + "/mod.ff")) + { + data.push_back({ "mod", 1, 0 }); + } + return FastFiles::LoadDLCUIZones(data.data(), data.size(), sync); } @@ -210,7 +215,7 @@ namespace Components std::string path = FastFiles::GetZoneLocation(file.data()); path.append(file); - if (!Utils::String::EndsWith(path.data(), ".ff")) + if (!Utils::String::EndsWith(path, ".ff")) { path.append(".ff"); } @@ -229,7 +234,7 @@ namespace Components std::vector paths; std::string modDir = Dvar::Var("fs_game").get(); - if (file == "mod"s || file == "mod.ff"s || !modDir.empty()) + if ((file == "mod"s || file == "mod.ff"s) && !modDir.empty()) { paths.push_back(Utils::String::VA("%s\\", modDir.data())); }