fixed (not) pushing already moving elements in BD engine 4.4.0.0-test-5
authorHolger Schemel <holger.schemel@virtion.de>
Sun, 8 Dec 2024 00:09:47 +0000 (01:09 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Sun, 8 Dec 2024 00:12:10 +0000 (01:12 +0100)
src/game_bd/bd_caveengine.c

index 568006f79d37bd01de87b5406fcf3994c162bad5..6ac86de149e0ef9a4c0609ce8047a443aa0ccf07 100644 (file)
@@ -1350,7 +1350,9 @@ static boolean do_push(GdCave *cave, int x, int y, GdDirection player_move, bool
            break;
        }
 
+       // only push game element if not already moving
        if (is_like_space(cave, x, y, twice[player_move]) &&
+           game_bd.game->dir_buffer_to[what_y][what_x] == GD_MV_STILL &&
            gd_rand_int_range(cave->random, 0, 1000000) < prob)
        {
          // if decided that he will be able to push,