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.
This commit is contained in:
Pranay Sanghai authored and Tixx committed 2024-10-12 21:15:10 +02:00
1 parent 423519f31e
commit 43b02f0118
1 file changed
+1 -1
+1 -1
View File
@@ -186,7 +186,7 @@ void LegitimacyCheck() {
auto root = tyti::vdf::read(libraryFolders); auto root = tyti::vdf::read(libraryFolders);
for (auto folderInfo : root.childs) { 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/"; GameDir = folderInfo.second->attribs["path"] + "/steamapps/common/BeamNG.drive/";
break; break;
} }