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 2024-06-08 18:58:13 -07:00 committed by Tixx
parent 423519f31e
commit 43b02f0118

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;
} }