changed BD engine to match new GDash code (pneumatic hammer sound)
authorHolger Schemel <holger.schemel@virtion.de>
Sun, 15 Sep 2024 19:34:24 +0000 (21:34 +0200)
committerHolger Schemel <holger.schemel@virtion.de>
Sun, 15 Sep 2024 19:34:38 +0000 (21:34 +0200)
src/game_bd/bd_caveengine.c

index e7c3263b090f74132247d087534198d985157ba3..5f8c5b7ee9a4040d37665b158fc9ed645f99762e 100644 (file)
@@ -2330,6 +2330,10 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
          // the active pneumatic hammer itself
        case O_PNEUMATIC_ACTIVE_RIGHT:
        case O_PNEUMATIC_ACTIVE_LEFT:
+          // pneumatic hammer sound
+          if (cave->pneumatic_hammer_active_delay > 0)
+            gd_sound_play(cave, GD_S_PNEUMATIC_HAMMER, O_PNEUMATIC_HAMMER, -1, -1);
+
          if (cave->pneumatic_hammer_active_delay == 0)
          {
            GdElement new_elem;
@@ -3938,10 +3942,6 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
       play_sound_of_element(cave, O_AMOEBA, -1, -1);
   }
 
-  // pneumatic hammer sound - overrides everything.
-  if (cave->pneumatic_hammer_active_delay > 0)
-    gd_sound_play(cave, GD_S_PNEUMATIC_HAMMER, O_PNEUMATIC_HAMMER, -1, -1);
-
 
   // ============================================================================
   // CAVE VARIABLES