mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-12-24 11:48:34 +01:00
Properly initialize user_achievements so functions like
getachievementandunlocktime work properly.
This commit is contained in:
parent
58a57cc91b
commit
992e5c3faa
1 changed files with 10 additions and 0 deletions
|
@ -94,6 +94,16 @@ Steam_User_Stats(Settings *settings, Local_Storage *local_storage, class SteamCa
|
|||
{
|
||||
load_achievements_db(); // achievements db
|
||||
load_achievements(); // achievements per user
|
||||
|
||||
for (auto & it : defined_achievements) {
|
||||
try {
|
||||
std::string name = static_cast<std::string const&>(it["name"]);
|
||||
if (user_achievements.find(name) == user_achievements.end()) {
|
||||
user_achievements[name]["earned"] = false;
|
||||
user_achievements[name]["earned_time"] = static_cast<uint32>(0);
|
||||
}
|
||||
} catch (...) {}
|
||||
}
|
||||
}
|
||||
|
||||
// Ask the server to send down this user's data and achievements for this game
|
||||
|
|
Loading…
Reference in a new issue