rnd-20091012-1-src
[rocksndiamonds.git] / src / game.c
index daf96fe52f7da0c1e22d0cfc4b6fa5539d17bd27..eb115cb3978c1e6e27da7a57d7a196f9b683b1b2 100644 (file)
@@ -12037,6 +12037,18 @@ static void CheckLevelTime()
        level.native_em_level->ply[3]->alive == 0)      /* all dead */
       AllPlayersGone = TRUE;
   }
+  else if (level.game_engine_type == GAME_ENGINE_TYPE_SP)
+  {
+    if (game_sp_info.LevelSolved)                      /* game won */
+    {
+      PlayerWins(local_player);
+
+      AllPlayersGone = TRUE;
+    }
+
+    if (game_sp_info.GameOver)                         /* game lost */
+      AllPlayersGone = TRUE;
+  }
 
   if (TimeFrames >= FRAMES_PER_SECOND)
   {