changed BD engine to match new GDash code (player birth)
authorHolger Schemel <holger.schemel@virtion.de>
Mon, 16 Sep 2024 18:19:06 +0000 (20:19 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Mon, 16 Sep 2024 18:19:06 +0000 (20:19 +0200)
src/game_bd/bd_caveengine.c

index 4613034405e1b20cb9c8e350f0d702a81e195034..1b8be0431136ac00ac7756ea55624d691763d996 100644 (file)
@@ -3796,12 +3796,24 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
          break;
 
        case O_INBOX:
+         cave->player_seen_ago = 0;
          if (cave->hatched && !inbox_toggle)    // if it is time of birth
            store(cave, x, y, O_PRE_PL_1);
          inbox_toggle = !inbox_toggle;
          break;
 
+       case O_PRE_PL_1:
+         cave->player_seen_ago = 0;
+         store(cave, x, y, O_PRE_PL_2);
+         break;
+
+       case O_PRE_PL_2:
+         cave->player_seen_ago = 0;
+         store(cave, x, y, O_PRE_PL_3);
+         break;
+
        case O_PRE_PL_3:
+         cave->player_seen_ago = 0;
          store(cave, x, y, O_PLAYER);
          break;
 
@@ -3834,8 +3846,6 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
        case O_EXPLODE_2:
        case O_EXPLODE_3:
        case O_EXPLODE_4:
-       case O_PRE_PL_1:
-       case O_PRE_PL_2:
        case O_PRE_CLOCK_1:
        case O_PRE_CLOCK_2:
        case O_PRE_CLOCK_3: