mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-18 21:25:32 +00:00
Steam returns true even if the achievement is already set
This commit is contained in:
parent
c60a763f68
commit
f15b2b0458
@ -249,9 +249,11 @@ bool SetAchievement( const char *pchName )
|
|||||||
auto it = std::find_if(defined_achievements.begin(), defined_achievements.end(), [pchName](nlohmann::json& item) {
|
auto it = std::find_if(defined_achievements.begin(), defined_achievements.end(), [pchName](nlohmann::json& item) {
|
||||||
return item["name"].get<std::string>() == pchName;
|
return item["name"].get<std::string>() == pchName;
|
||||||
});
|
});
|
||||||
if (it != defined_achievements.end() && user_achievements[pchName]["earned"] == false) {
|
if (it != defined_achievements.end()) {
|
||||||
user_achievements[pchName]["earned"] = true;
|
if (user_achievements[pchName]["earned"] == false) {
|
||||||
user_achievements[pchName]["earned_time"] = static_cast<uint32>(std::time(nullptr));
|
user_achievements[pchName]["earned"] = true;
|
||||||
|
user_achievements[pchName]["earned_time"] = static_cast<uint32>(std::time(nullptr));
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
} catch (...) {}
|
} catch (...) {}
|
||||||
|
Loading…
Reference in New Issue
Block a user