From: Holger Schemel Date: Mon, 1 Nov 2021 09:08:21 +0000 (+0100) Subject: fixed speedup for missing tapes when auto-playing/testing/uploading X-Git-Tag: 4.3.0.0~1 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=8f4f3f1000bfa5a9433b369d5de8f4552102847c;p=rocksndiamonds.git 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. --- 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; }