From e92725ea865541bee3e17ff633e6989100b1ae02 Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 11 Sep 2025 15:38:25 +0100 Subject: [PATCH 1/2] Accounting for minor bug in previous versions: Clean up characters whose rounds would otherwise be permanently stuck under their wins, but only when converting gamedata --- src/g_gamedata.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/g_gamedata.cpp b/src/g_gamedata.cpp index 07e964e0d..d545b8f1b 100644 --- a/src/g_gamedata.cpp +++ b/src/g_gamedata.cpp @@ -538,11 +538,12 @@ void srb2::load_ng_gamedata() dummyrecord.wins = skinpair.second.records.wins; dummyrecord.rounds = skinpair.second.records.rounds; -#ifdef DEVELOP - // Only good for testing, not for active play... cheaters never prosper! - if (dummyrecord.rounds < dummyrecord.wins) + // Used to be only for testing, but then there was a bug in release builds! Now conversion only + if (minorversion < 2 && dummyrecord.rounds < dummyrecord.wins) + { dummyrecord.rounds = dummyrecord.wins; -#endif + converted = true; + } dummyrecord.timeplayed = skinpair.second.records.time.total; dummyrecord.modetimeplayed[GDGT_RACE] = skinpair.second.records.time.race; From 5fb1da94e0499e44d67601148ad6f37cff217adb Mon Sep 17 00:00:00 2001 From: toaster Date: Thu, 11 Sep 2025 15:40:56 +0100 Subject: [PATCH 2/2] PRE-unlock Brakes, Drifting, and Springs if your gamedata is converted from post-goner state Means you'll only see a pop-up/challenge board visit for the Items tutorial, which is the new material you didn't previously have access to --- src/g_gamedata.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/g_gamedata.cpp b/src/g_gamedata.cpp index d545b8f1b..ef7480987 100644 --- a/src/g_gamedata.cpp +++ b/src/g_gamedata.cpp @@ -33,6 +33,7 @@ namespace fs = std::filesystem; #define GD_MINIMUM_SPRAYCANSV2 (2) #define GD_MINIMUM_TIMEATTACKV2 (2) +#define GD_MINIMUM_TUTORIALLOCK (2) void srb2::save_ng_gamedata() { @@ -917,6 +918,16 @@ void srb2::load_ng_gamedata() converted = true; } + if (minorversion < GD_MINIMUM_TUTORIALLOCK && gamedata->gonerlevel >= GDGONER_DONE) + { + converted = true; + uint16_t checklocks[] = {751, 752, 754}; // Brakes, Drifting, Springs + for (uint16_t checklock : checklocks) + { + gamedata->unlocked[checklock - 1] = true; + } + } + M_FinaliseGameData(); if (converted)