fixed moving already moving elements on conveyor belt in BD engine
authorHolger Schemel <holger.schemel@virtion.de>
Sat, 7 Dec 2024 23:44:01 +0000 (00:44 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Sat, 7 Dec 2024 23:57:08 +0000 (00:57 +0100)
This changes commit c1a2e3cc to be more generic: Generally prevent
moving any elements on (or under) a conveyor belt that are already
moving.

src/game_bd/bd_caveengine.c

index 88f4f2ba7b57f3e3406cf94f704da25b21098ec1..568006f79d37bd01de87b5406fcf3994c162bad5 100644 (file)
@@ -3695,8 +3695,8 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
                 int old_x = getx(cave, raw_x, raw_y);
                 int old_y = gety(cave, raw_x, raw_y);
 
-                // only move game element if not already moving in that direction (or if buggy)
-                if (game_bd.game->dir_buffer_to[old_y][old_x] != move_dir ||
+                // only move game element if not already moving (or if buggy)
+                if (game_bd.game->dir_buffer_to[old_y][old_x] == GD_MV_STILL ||
                     cave->conveyor_belts_buggy)
                 {
                   store(cave, old_x, old_y, O_SPACE);              // place a space ...
@@ -3730,8 +3730,8 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire,
                 int old_x = getx(cave, raw_x, raw_y);
                 int old_y = gety(cave, raw_x, raw_y);
 
-                // only move game element if not already moving in that direction (or if buggy)
-                if (game_bd.game->dir_buffer_to[old_y][old_x] != move_dir ||
+                // only move game element if not already moving (or if buggy)
+                if (game_bd.game->dir_buffer_to[old_y][old_x] == GD_MV_STILL ||
                     cave->conveyor_belts_buggy)
                 {
                   store(cave, old_x, old_y, O_SPACE);              // place a space ...