From: Holger Schemel Date: Tue, 5 Oct 2021 16:06:15 +0000 (+0200) Subject: added extreme speedup in case of missing tapes when auto-testing X-Git-Tag: 4.3.0.0~22 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=b4d5ee2c;p=rocksndiamonds.git added extreme speedup in case of missing tapes when auto-testing This uses the same tape check to speed things up in case of missing tapes that was already used for uploading tapes in commit e11fa67d. --- diff --git a/src/tape.c b/src/tape.c index f5d78c6a..92d24473 100644 --- a/src/tape.c +++ b/src/tape.c @@ -1696,17 +1696,18 @@ static int AutoPlayTapesExt(boolean initialize) if (!global.autoplay_all && !global.autoplay_level[level_nr]) continue; - if (global.autoplay_mode == AUTOPLAY_MODE_UPLOAD) + char *tape_filename = (autoplay.tape_filename ? autoplay.tape_filename : + options.mytapes ? getTapeFilename(level_nr) : + getSolutionTapeFilename(level_nr)); + + // speed things up in case of missing tapes (by skipping loading level) + if (!fileExists(tape_filename)) { - // speed things up when uploading all existing private tapes - if (autoplay.all_levelsets && !fileExists(getTapeFilename(level_nr))) - { - autoplay.num_tape_missing++; + autoplay.num_tape_missing++; - Print("Tape %03d: (no tape found)\n", level_nr); + Print("Tape %03d: (no tape found)\n", level_nr); - continue; - } + continue; } TapeErase(); @@ -1738,7 +1739,7 @@ static int AutoPlayTapesExt(boolean initialize) { autoplay.num_tape_missing++; - Print("Tape %03d: (no tape found)\n", level_nr); + Print("Tape %03d: (invalid tape)\n", level_nr); continue; }