fixed playing BD engine levels if preferred network player changed
authorHolger Schemel <holger.schemel@virtion.de>
Sun, 8 Dec 2024 14:48:48 +0000 (15:48 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Sun, 8 Dec 2024 16:51:13 +0000 (17:51 +0100)
src/game.c

index af54fecc15ef8c73c496fa8457f07e58d161bb1c..2ae3cf0d51c73ccde7c36a4d360f82d67f086fcc 100644 (file)
@@ -1775,6 +1775,11 @@ static void InitPlayerField(int x, int y, int element, boolean init_game)
       Tile[x][y] = EL_PLAYER_1;
     }
   }
+  else if (element < EL_PLAYER_1 || element > EL_PLAYER_4)
+  {
+    // needed for BD engine with preferred player other than first player
+    Tile[x][y] = GET_PLAYER_ELEMENT(element);
+  }
 
   if (init_game)
   {
@@ -1886,6 +1891,12 @@ static void InitField(int x, int y, boolean init_game)
     case EL_PLAYER_2:
     case EL_PLAYER_3:
     case EL_PLAYER_4:
+    case EL_BDX_INBOX:
+    case EL_BDX_PLAYER:
+    case EL_BDX_PLAYER_WITH_BOMB:
+    case EL_BDX_PLAYER_WITH_ROCKET_LAUNCHER:
+    case EL_BDX_PLAYER_GLUED:
+    case EL_BDX_PLAYER_SCANNED:
       InitPlayerField(x, y, element, init_game);
       break;