Make live event backup files savedata specific (new format: `live%s.bkp`, where %s is the time attack folder name/savegame name - so vanilla's is `livesrb2sav.bkp`).

This commit is contained in:
toaster 2020-05-15 13:37:06 +01:00
parent 2aa542d2bf
commit 4348ebdfa8
2 changed files with 4 additions and 1 deletions

View File

@ -1135,7 +1135,7 @@ void D_SRB2Main(void)
// default savegame
strcpy(savegamename, SAVEGAMENAME"%u.ssg");
strcpy(liveeventbackup,"liveevent.bkp"); // intentionally not ending with .ssg
strcpy(liveeventbackup, "live"SAVEGAMENAME".bkp"); // intentionally not ending with .ssg
{
const char *userhome = D_Home(); //Alam: path to home

View File

@ -4211,6 +4211,9 @@ static void readmaincfg(MYFILE *f)
// can't use sprintf since there is %u in savegamename
strcatbf(savegamename, srb2home, PATHSEP);
strcpy(liveeventbackup, va("live%s.bkp", timeattackfolder));
strcatbf(liveeventbackup, srb2home, PATHSEP);
gamedataadded = true;
titlechanged = true;
}