projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug with re-scanning laser when rotating teleporter in MM engine
[rocksndiamonds.git]
/
src
/
tape.c
diff --git
a/src/tape.c
b/src/tape.c
index 4efba84a76f7c05072ca49121845334cc744b940..0a7dffc3db840681520a6c5fdb371cb155009772 100644
(file)
--- a/
src/tape.c
+++ b/
src/tape.c
@@
-779,7
+779,9
@@
static void TapeAppendRecording(void)
void TapeHaltRecording(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)
// 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.pos[tape.counter].delay++;
}
+ tape.changed = TRUE;
+
return TRUE;
}
return TRUE;
}
@@
-1185,22
+1189,25
@@
static void TapeSingleStep(void)
void TapeQuickSave(void)
{
void TapeQuickSave(void)
{
- if (game_status
== GAME_MODE_MAIN
)
+ if (game_status
!= GAME_MODE_PLAYING
)
{
{
- Request("No game that c
an
be saved!", REQ_CONFIRM);
+ Request("No game that c
ould
be saved!", REQ_CONFIRM);
return;
}
return;
}
- if (game_status != GAME_MODE_PLAYING)
+ if (!tape.recording)
+ {
+ Request("No recording that could be saved!", REQ_CONFIRM);
+
return;
return;
+ }
- if (tape.recording)
- TapeHaltRecording(); // prepare tape for saving on-the-fly
+ TapeHaltRecording(); // prepare tape for saving on-the-fly
if (TAPE_IS_EMPTY(tape))
{
if (TAPE_IS_EMPTY(tape))
{
- Request("No tape that c
an
be saved!", REQ_CONFIRM);
+ Request("No tape that c
ould
be saved!", REQ_CONFIRM);
return;
}
return;
}