From 8f4f3f1000bfa5a9433b369d5de8f4552102847c Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 1 Nov 2021 10:08:21 +0100 Subject: [PATCH] fixed speedup for missing tapes when auto-playing/testing/uploading The tape check to speed up automatic tape playing/testing/uploading for missing tapes (by skipping loading the level) was buggy, because non-standard solution tapes (like Supaplex tapes that are part of the level file) were also wrongly detected as "missing" (and therefore skipped). This problem was fixed by only checking for missing private tapes, but not doing the check if handling solution tapes or explicitly specified tape files. This fixes commits e11fa67d and b4d5ee2c. --- src/tape.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/tape.c b/src/tape.c index 793bf0ce..03ecf689 100644 --- a/src/tape.c +++ b/src/tape.c @@ -1612,6 +1612,7 @@ static int AutoPlayTapesExt(boolean initialize) global.autoplay_level[tape.level_nr] = TRUE; global.autoplay_all = FALSE; + options.mytapes = FALSE; } if (autoplay.all_levelsets) @@ -1701,12 +1702,8 @@ static int AutoPlayTapesExt(boolean initialize) if (!global.autoplay_all && !global.autoplay_level[level_nr]) continue; - 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 in case of missing private tapes (skip loading level) + if (options.mytapes && !fileExists(getTapeFilename(level_nr))) { autoplay.num_tape_missing++; @@ -1744,7 +1741,7 @@ static int AutoPlayTapesExt(boolean initialize) { autoplay.num_tape_missing++; - Print("Tape %03d: (invalid tape)\n", level_nr); + Print("Tape %03d: (no tape found)\n", level_nr); continue; } -- 2.34.1