Merge branch 'savedata_fixes' into 'master'

Gamedata fixes

Closes #35

See merge request KartKrew/Kart!97
This commit is contained in:
Sal 2018-11-17 16:53:56 -05:00
commit 37596d445c
2 changed files with 4 additions and 3 deletions

View file

@ -2293,10 +2293,8 @@ static inline void G_PlayerFinishLevel(INT32 player)
{
matchesplayed++;
if (M_UpdateUnlockablesAndExtraEmblems(true))
{
S_StartSound(NULL, sfx_ncitem);
G_SaveGameData(true); // only save if unlocked something
}
G_SaveGameData(true);
}
legitimateexit = false;

View file

@ -712,6 +712,9 @@ static void Y_UpdateRecordReplays(void)
if ((earnedEmblems = M_CheckLevelEmblems()))
CONS_Printf(M_GetText("\x82" "Earned %hu medal%s for Record Attack records.\n"), (UINT16)earnedEmblems, earnedEmblems > 1 ? "s" : "");
// SRB2Kart - save here so you NEVER lose your earned times/medals.
G_SaveGameData(false);
// Update timeattack menu's replay availability.
CV_AddValue(&cv_nextmap, 1);
CV_AddValue(&cv_nextmap, -1);