diff options
author | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-09-15 00:20:56 +0100 |
---|---|---|
committer | BobTheBob9 <for.oliver.kirkham@gmail.com> | 2022-09-15 00:20:56 +0100 |
commit | ba26be9bea801f219fa6340178fd6b13f02d574e (patch) | |
tree | f50e67e06f7174daca0c97cf95659c7cbcef8151 /NorthstarDLL/modmanager.cpp | |
parent | d2907aa522d56a4baacec1c17426f7d6f1fae3a2 (diff) | |
download | NorthstarLauncher-ba26be9bea801f219fa6340178fd6b13f02d574e.tar.gz NorthstarLauncher-ba26be9bea801f219fa6340178fd6b13f02d574e.zip |
clang format, fix issues with server registration and rpak loading
Diffstat (limited to 'NorthstarDLL/modmanager.cpp')
-rw-r--r-- | NorthstarDLL/modmanager.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/NorthstarDLL/modmanager.cpp b/NorthstarDLL/modmanager.cpp index c9dfcdbb..05060902 100644 --- a/NorthstarDLL/modmanager.cpp +++ b/NorthstarDLL/modmanager.cpp @@ -401,13 +401,12 @@ void ModManager::LoadMods() std::string formattedPath = file.path().filename().string(); // this really fucking sucks but it'll work - std::string vpkName = - (file.path().parent_path() / formattedPath.substr(strlen("english"), formattedPath.find(".bsp") - 3)).string(); + std::string vpkName = formattedPath.substr(strlen("english"), formattedPath.find(".bsp") - 3); ModVPKEntry& modVpk = mod.Vpks.emplace_back(); modVpk.m_bAutoLoad = !bUseVPKJson || (dVpkJson.HasMember("Preload") && dVpkJson["Preload"].IsObject() && dVpkJson["Preload"].HasMember(vpkName) && dVpkJson["Preload"][vpkName].IsTrue()); - modVpk.m_sVpkPath = vpkName; + modVpk.m_sVpkPath = (file.path().parent_path() / vpkName).string(); if (m_bHasLoadedMods && modVpk.m_bAutoLoad) (*R2::g_pFilesystem)->m_vtable->MountVPK(*R2::g_pFilesystem, vpkName.c_str()); @@ -484,7 +483,8 @@ void ModManager::LoadMods() { if (fs::is_regular_file(file)) { - std::string kvStr = g_pModManager->NormaliseModFilePath(file.path().lexically_relative(mod.m_ModDirectory / "keyvalues")); + std::string kvStr = + g_pModManager->NormaliseModFilePath(file.path().lexically_relative(mod.m_ModDirectory / "keyvalues")); mod.KeyValues.emplace(STR_HASH(kvStr), kvStr); } } |