X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=d5d07236ea392c22910f4e17c0845f216b3c5819;hb=6f5d13e1d289522630e9f5f4827420a2229876af;hp=cf65474af537c6af772c7ab44f81eaac952222fb;hpb=f2e98436acf26eff762250802ae4ee910ebdfe1a;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index cf65474a..d5d07236 100644 --- a/src/tape.c +++ b/src/tape.c @@ -1464,6 +1464,7 @@ static int AutoPlayTapesExt(boolean initialize) -1 }; + LevelDirTree *leveldir_current_last = leveldir_current; boolean init_level_set = FALSE; int i; @@ -1694,6 +1695,19 @@ static int AutoPlayTapesExt(boolean initialize) if (!global.autoplay_all && !global.autoplay_level[level_nr]) continue; + if (global.autoplay_mode == AUTOPLAY_MODE_UPLOAD) + { + // speed things up when uploading all existing private tapes + if (autoplay.all_levelsets && !fileExists(getTapeFilename(level_nr))) + { + autoplay.num_tape_missing++; + + Print("Tape %03d: (no tape found)\n", level_nr); + + continue; + } + } + TapeErase(); TapeRewind(); // needed to reset "tape.auto_play_level_solved" @@ -1843,6 +1857,9 @@ static int AutoPlayTapesExt(boolean initialize) if (program.headless) CloseAllAndExit(0); + // when running interactively, restore last selected level set + leveldir_current = leveldir_current_last; + return num_tapes; }