[FastFiles] Add support for mod.ff

This commit is contained in:
momo5502 2017-02-13 19:40:53 +01:00
parent bc68e1b0fa
commit 90c646e698

View File

@ -137,6 +137,11 @@ namespace Components
data.push_back({ "iw4x_patch_mp", 1, 0 }); data.push_back({ "iw4x_patch_mp", 1, 0 });
} }
if (Utils::IO::FileExists(Dvar::Var("fs_game").get<std::string>() + "/mod.ff"))
{
data.push_back({ "mod", 1, 0 });
}
return FastFiles::LoadDLCUIZones(data.data(), data.size(), sync); return FastFiles::LoadDLCUIZones(data.data(), data.size(), sync);
} }
@ -210,7 +215,7 @@ namespace Components
std::string path = FastFiles::GetZoneLocation(file.data()); std::string path = FastFiles::GetZoneLocation(file.data());
path.append(file); path.append(file);
if (!Utils::String::EndsWith(path.data(), ".ff")) if (!Utils::String::EndsWith(path, ".ff"))
{ {
path.append(".ff"); path.append(".ff");
} }
@ -229,7 +234,7 @@ namespace Components
std::vector<std::string> paths; std::vector<std::string> paths;
std::string modDir = Dvar::Var("fs_game").get<std::string>(); std::string modDir = Dvar::Var("fs_game").get<std::string>();
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())); paths.push_back(Utils::String::VA("%s\\", modDir.data()));
} }