mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Drop time attack 1.0 records entirely on gamedata conversion
- We keep medals, but times are invalid due to the massive overhaul! - To avoid double increment of minorversion, this will not fire on current internal, only 2.3 gamedatas
This commit is contained in:
parent
b4bb4db12b
commit
afab1eebd0
1 changed files with 17 additions and 4 deletions
|
|
@ -32,6 +32,7 @@ namespace fs = std::filesystem;
|
|||
#define GD_VERSION_MINOR (2)
|
||||
|
||||
#define GD_MINIMUM_SPRAYCANSV2 (2)
|
||||
#define GD_MINIMUM_TIMEATTACKV2 (2)
|
||||
|
||||
void srb2::save_ng_gamedata()
|
||||
{
|
||||
|
|
@ -614,10 +615,22 @@ void srb2::load_ng_gamedata()
|
|||
dummyrecord.mapvisited |= mappair.second.visited.encore ? MV_ENCORE : 0;
|
||||
dummyrecord.mapvisited |= mappair.second.visited.spbattack ? MV_SPBATTACK : 0;
|
||||
dummyrecord.mapvisited |= mappair.second.visited.mysticmelody ? MV_MYSTICMELODY : 0;
|
||||
dummyrecord.timeattack.time = mappair.second.stats.timeattack.besttime;
|
||||
dummyrecord.timeattack.lap = mappair.second.stats.timeattack.bestlap;
|
||||
dummyrecord.spbattack.time = mappair.second.stats.spbattack.besttime;
|
||||
dummyrecord.spbattack.lap = mappair.second.stats.spbattack.bestlap;
|
||||
|
||||
if (minorversion >= GD_MINIMUM_TIMEATTACKV2)
|
||||
{
|
||||
dummyrecord.timeattack.time = mappair.second.stats.timeattack.besttime;
|
||||
dummyrecord.timeattack.lap = mappair.second.stats.timeattack.bestlap;
|
||||
dummyrecord.spbattack.time = mappair.second.stats.spbattack.besttime;
|
||||
dummyrecord.spbattack.lap = mappair.second.stats.spbattack.bestlap;
|
||||
}
|
||||
else
|
||||
{
|
||||
converted = true;
|
||||
|
||||
dummyrecord.timeattack.time = dummyrecord.timeattack.lap = \
|
||||
dummyrecord.spbattack.time = dummyrecord.spbattack.lap = 0;
|
||||
}
|
||||
|
||||
dummyrecord.timeplayed = mappair.second.stats.time.total;
|
||||
dummyrecord.netgametimeplayed = mappair.second.stats.time.netgame;
|
||||
dummyrecord.modetimeplayed[GDGT_RACE] = mappair.second.stats.time.race;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue