rnd-19981106-1
[rocksndiamonds.git] / src / game.c
index c19a74da3a3a696727ecf48a25697668f828edc1..b8b43f55c3d51993f7f277c01e19e6789841b97c 100644 (file)
@@ -289,10 +289,26 @@ void InitGame()
 
   /* when in single player mode, eliminate all but the first active player */
   if (!options.network && !setup.team_mode)
+  {
     for(i=0; i<MAX_PLAYERS; i++)
+    {
       if (stored_player[i].active)
+      {
        for(j=i+1; j<MAX_PLAYERS; j++)
-         stored_player[j].active = FALSE;
+       {
+         struct PlayerInfo *player = &stored_player[j];
+         int jx = player->jx, jy = player->jy;
+
+         if (player->active)
+         {
+           player->active = FALSE;
+           StorePlayer[jx][jy] = 0;
+           Feld[jx][jy] = EL_LEERRAUM;
+         }
+       }
+      }
+    }
+  }
 
   for(i=0; i<MAX_PLAYERS; i++)
   {