minor code cleanup
authorHolger Schemel <holger.schemel@virtion.de>
Wed, 4 Dec 2024 19:35:16 +0000 (20:35 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Wed, 4 Dec 2024 15:35:32 +0000 (16:35 +0100)
src/game_bd/bd_caveengine.c

index 0c208693e2b999ee53f1c6f34d055e59a586082d..e64699dedc86b831de2b10f57971c8d2ee697ed1 100644 (file)
@@ -3858,23 +3858,20 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
 
        case O_PRE_PL_1:
          cave->player_seen_ago = 0;
-          if (!cave->hatched)                    // no player birth before hatching
-            break;
-         store(cave, x, y, O_PRE_PL_2);
+         if (cave->hatched)                     // no player birth before hatching
+           store(cave, x, y, O_PRE_PL_2);
          break;
 
        case O_PRE_PL_2:
          cave->player_seen_ago = 0;
-          if (!cave->hatched)                    // no player birth before hatching
-            break;
-         store(cave, x, y, O_PRE_PL_3);
+         if (cave->hatched)                     // no player birth before hatching
+           store(cave, x, y, O_PRE_PL_3);
          break;
 
        case O_PRE_PL_3:
          cave->player_seen_ago = 0;
-          if (!cave->hatched)                    // no player birth before hatching
-            break;
-         store(cave, x, y, O_PLAYER_START);     // newly born player invulnerable for one frame
+         if (cave->hatched)                     // no player birth before hatching
+           store(cave, x, y, O_PLAYER_START);   // newly born player invulnerable for one frame
          break;
 
        case O_PRE_DIA_1: