rnd-20060818-1-src
[rocksndiamonds.git] / src / game.c
index 4e4c901c990286248b043614b2716d243a3d822e..703cfa54c6a07d17cc1830cd5e4d867c385411fd 100644 (file)
@@ -9924,8 +9924,26 @@ void GameActions()
   network_player_action_received = FALSE;
 #endif
 
+  /* when playing tape, read previously recorded player input from tape data */
   recorded_player_action = (tape.playing ? TapePlayAction() : NULL);
 
+#if 1
+  /* TapePlayAction() may return NULL when toggling to "pause before death" */
+  if (tape.pausing)
+    return;
+#endif
+
+#if 0
+  if (tape.playing)
+  {
+    if (recorded_player_action == NULL)
+      printf("!!! THIS SHOULD NOT HAPPEN !!!\n");
+    else
+      printf("::: %05d: TAPE PLAYING: %08x\n",
+            FrameCounter, recorded_player_action[0]);
+  }
+#endif
+
   if (tape.set_centered_player)
   {
     game.centered_player_nr_next = tape.centered_player_nr_next;
@@ -9972,6 +9990,12 @@ void GameActions()
   if (tape.recording)
     TapeRecordAction(tape_action);
 
+#if 0
+  if (tape.recording)
+    printf("::: %05d: TAPE RECORDING: %08x\n",
+          FrameCounter, tape_action[0]);
+#endif
+
   if (level.game_engine_type == GAME_ENGINE_TYPE_EM)
   {
     GameActions_EM_Main();