diff --git a/src/g_gamedata.cpp b/src/g_gamedata.cpp index 9268f6b98..ca28d6a01 100644 --- a/src/g_gamedata.cpp +++ b/src/g_gamedata.cpp @@ -187,7 +187,7 @@ void srb2::save_ng_gamedata() cupdata.records[i].bestgrade = cup->windata[i].best_grade; cupdata.records[i].bestplacement = cup->windata[i].best_placement; cupdata.records[i].bestskin = std::string(skins[cup->windata[i].best_skin.id].name); - cupdata.records[i].emerald = cup->windata[i].got_emerald; + cupdata.records[i].gotemerald = cup->windata[i].got_emerald; } ng.cups[cupdata.name] = std::move(cupdata); } @@ -204,7 +204,7 @@ void srb2::save_ng_gamedata() cupdata.records[i].bestgrade = unloadedcup->windata[i].best_grade; cupdata.records[i].bestplacement = unloadedcup->windata[i].best_placement; cupdata.records[i].bestskin = std::string(skins[unloadedcup->windata[i].best_skin.id].name); - cupdata.records[i].emerald = unloadedcup->windata[i].got_emerald; + cupdata.records[i].gotemerald = unloadedcup->windata[i].got_emerald; } ng.cups[cupdata.name] = std::move(cupdata); } @@ -640,7 +640,7 @@ void srb2::load_ng_gamedata() { dummywindata[j].best_placement = cuppair.second.records[j].bestplacement; dummywindata[j].best_grade = static_cast(cuppair.second.records[j].bestgrade); - dummywindata[j].got_emerald = cuppair.second.records[j].emerald; + dummywindata[j].got_emerald = cuppair.second.records[j].gotemerald; dummywindata[j].best_skin.id = MAXSKINS; dummywindata[j].best_skin.unloaded = nullptr; diff --git a/src/g_gamedata.h b/src/g_gamedata.h index 72fac373c..d476f2e46 100644 --- a/src/g_gamedata.h +++ b/src/g_gamedata.h @@ -170,10 +170,10 @@ struct GamedataCupRecordsJson final { uint8_t bestplacement; uint8_t bestgrade; - uint8_t emerald; + bool gotemerald; std::string bestskin; - NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(GamedataCupRecordsJson, bestplacement, bestgrade, emerald, bestskin) + NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT(GamedataCupRecordsJson, bestplacement, bestgrade, gotemerald, bestskin) }; struct GamedataCupJson final