From 43b02f011861d3675227acacbbcc17c2db352951 Mon Sep 17 00:00:00 2001 From: Pranay Sanghai <37276884+gamingdoom@users.noreply.github.com> Date: Sat, 8 Jun 2024 18:58:13 -0700 Subject: [PATCH] Update Check For Game Files Beforehand, it would check only if the game directory existed. This would lead to an error if the game is moved through Steam since it leaves the BeamNG.Drive directory. Now it checks for integrity.json. I also removed some commented out code I left behind. --- src/Security/BeamNG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Security/BeamNG.cpp b/src/Security/BeamNG.cpp index 9e051c8..f77c7c1 100644 --- a/src/Security/BeamNG.cpp +++ b/src/Security/BeamNG.cpp @@ -186,7 +186,7 @@ void LegitimacyCheck() { auto root = tyti::vdf::read(libraryFolders); for (auto folderInfo : root.childs) { - if (std::filesystem::exists(folderInfo.second->attribs["path"] + "/steamapps/common/BeamNG.drive/")) { + if (std::filesystem::exists(folderInfo.second->attribs["path"] + "/steamapps/common/BeamNG.drive/integrity.json")){ GameDir = folderInfo.second->attribs["path"] + "/steamapps/common/BeamNG.drive/"; break; }