From ce7c7a7d793f972a4945a6e891f963fcd44930cd Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 3 Sep 2024 22:00:44 +0200 Subject: [PATCH] changed code for handling replicators and conveyor belts in BD engine This change should not break any tapes. --- src/game_bd/bd_caveengine.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/game_bd/bd_caveengine.c b/src/game_bd/bd_caveengine.c index 20aa59f8..7e7cfa0e 100644 --- a/src/game_bd/bd_caveengine.c +++ b/src/game_bd/bd_caveengine.c @@ -2745,13 +2745,9 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire, // do not replicate players! // also obeys gravity settings. // only replicate element if it is not a scanned one - // do not replicate space... that condition looks like it - // makes no sense, but otherwise it generates SCANNED spaces, - // which cannot be "collected" by the player, so he cannot run - // under a replicator if (is_space_dir(cave, x, y, cave->gravity) && !is_player_dir(cave, x, y, opposite[cave->gravity]) && - !is_space_dir(cave, x, y, opposite[cave->gravity])) + !is_scanned_dir(cave, x, y, opposite[cave->gravity])) { store_dir(cave, x, y, cave->gravity, get_dir(cave, x, y, opposite[cave->gravity])); gd_sound_play(cave, GD_S_REPLICATOR, O_REPLICATOR, x, y); @@ -3403,8 +3399,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire, (cave->gravity == GD_MV_UP && moved_by_conveyor_bottom_dir(cave, x, y, GD_MV_UP))) { - if (!is_scanned_dir(cave, x, y, GD_MV_UP) && - is_space_dir(cave, x, y, dir[GD_MV_UP])) + if (is_space_dir(cave, x, y, dir[GD_MV_UP])) { // to allow smooth movement of game elements on conveyor belts, // the moving direction set by "store_dir()" must be set to the @@ -3436,8 +3431,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire, (cave->gravity == GD_MV_DOWN && moved_by_conveyor_bottom_dir(cave, x, y, GD_MV_DOWN))) { - if (!is_scanned_dir(cave, x, y, GD_MV_DOWN) && - is_space_dir(cave, x, y, dir[GD_MV_DOWN])) + if (is_space_dir(cave, x, y, dir[GD_MV_DOWN])) { // to allow smooth movement of game elements on conveyor belts, // the moving direction set by "store_dir()" must be set to the -- 2.34.1