X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Ftape.c;h=0a7dffc3db840681520a6c5fdb371cb155009772;hb=e535e7bdd3fa590016614187c7609e28e66355fe;hp=4ec51529953136bf25d03c5c1e685283792471f0;hpb=b0082cbe1518d7cc743cf708d7047a9fbd6ded86;p=rocksndiamonds.git diff --git a/src/tape.c b/src/tape.c index 4ec51529..0a7dffc3 100644 --- a/src/tape.c +++ b/src/tape.c @@ -779,7 +779,9 @@ static void TapeAppendRecording(void) void TapeHaltRecording(void) { - tape.counter++; + // only advance tape counter if any input events have been recorded + if (tape.pos[tape.counter].delay > 0) + tape.counter++; // initialize delay for next tape entry (to be able to continue recording) if (tape.counter < MAX_TAPE_LEN) @@ -834,6 +836,8 @@ boolean TapeAddAction(byte action[MAX_TAPE_ACTIONS]) tape.pos[tape.counter].delay++; } + tape.changed = TRUE; + return TRUE; }