aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/keyvalues.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-10-01 17:16:42 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-10-01 17:16:42 +0100
commit51df18abbc0c344b56f88e0a66b6b46d6aca375c (patch)
tree1ce680cb9134273870373134f845633e2c390bde /NorthstarDedicatedTest/keyvalues.cpp
parent1ff8e068e62d095775ef2ae54d3685d89238f28c (diff)
downloadNorthstarLauncher-51df18abbc0c344b56f88e0a66b6b46d6aca375c.tar.gz
NorthstarLauncher-51df18abbc0c344b56f88e0a66b6b46d6aca375c.zip
Revert "small modmanager refactors"
This reverts commit 1ff8e068e62d095775ef2ae54d3685d89238f28c.
Diffstat (limited to 'NorthstarDedicatedTest/keyvalues.cpp')
-rw-r--r--NorthstarDedicatedTest/keyvalues.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/NorthstarDedicatedTest/keyvalues.cpp b/NorthstarDedicatedTest/keyvalues.cpp
index 61170177..3d527e62 100644
--- a/NorthstarDedicatedTest/keyvalues.cpp
+++ b/NorthstarDedicatedTest/keyvalues.cpp
@@ -53,9 +53,9 @@ void ModManager::TryBuildKeyValues(const char* filename)
for (int i = m_loadedMods.size() - 1; i > -1; i--)
{
size_t fileHash = std::hash<std::string>{}(normalisedPath);
- for (int j = 0; j < m_loadedMods[i].KeyValuesHash.size(); j++)
+ for (int j = 0; j < m_loadedMods[i]->KeyValuesHash.size(); j++)
{
- if (fileHash == m_loadedMods[i].KeyValuesHash[j])
+ if (fileHash == m_loadedMods[i]->KeyValuesHash[j])
{
// should result in smth along the lines of #include "mod_patch_5_mp_weapon_car.txt"
@@ -70,7 +70,7 @@ void ModManager::TryBuildKeyValues(const char* filename)
fs::remove(compiledDir / patchFilePath);
- fs::copy_file(m_loadedMods[i].ModDirectory / "keyvalues" / filename, compiledDir / patchFilePath);
+ fs::copy_file(m_loadedMods[i]->ModDirectory / "keyvalues" / filename, compiledDir / patchFilePath);
}
}
}
@@ -120,9 +120,9 @@ void ModManager::TryBuildKeyValues(const char* filename)
writeStream << newKvs;
writeStream.close();
- ModOverrideFile overrideFile;
- overrideFile.owningMod = nullptr;
- overrideFile.path = normalisedPath;
+ ModOverrideFile* overrideFile = new ModOverrideFile;
+ overrideFile->owningMod = nullptr;
+ overrideFile->path = normalisedPath;
if (m_modFiles.find(normalisedPath) == m_modFiles.end())
m_modFiles.insert(std::make_pair(normalisedPath, overrideFile));