rnd-20050115-1-src
[rocksndiamonds.git] / src / screens.c
index ed616df1d60504fc5a5245d0951484ae2d6afec8..3d7cdf9d7873b28e4401b1581d52e474e10ab936 100644 (file)
@@ -2953,8 +2953,28 @@ void HandleGameActions()
     byte tape_action[MAX_PLAYERS];
     int i;
 
+    if (level.native_em_level->lev->home == 0) /* all players at home */
+    {
+      GameWon();
+
+      if (!TAPE_IS_STOPPED(tape))
+       TapeStop();
+
+      if (game_status != GAME_MODE_PLAYING)
+       return;
+    }
+
+    /* --- game actions --- */
+
     if (tape.pausing)
+    {
+      /* don't use 100% CPU while in pause mode -- this should better be solved
+        like in the R'n'D game engine! */
+
+      Delay(10);
+
       return;
+    }
 
     recorded_player_action = (tape.playing ? TapePlayAction() : NULL);
 
@@ -2997,6 +3017,7 @@ void HandleGameActions()
        DrawVideoDisplay(VIDEO_STATE_TIME_ON, TapeTime);
     }
 
+    FrameCounter++;
     TimeFrames++;
 
     BackToFront();