From: Holger Schemel Date: Sun, 15 Sep 2024 18:11:00 +0000 (+0200) Subject: changed BD engine to match new GDash code (player pushing) X-Git-Tag: 4.4.0.0-test-4~239 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=dfd085e5289c5e72d02dd74699d54411c547ca4e;p=rocksndiamonds.git changed BD engine to match new GDash code (player pushing) --- diff --git a/src/game_bd/bd_caveengine.c b/src/game_bd/bd_caveengine.c index a3bd4f26..d9c5c953 100644 --- a/src/game_bd/bd_caveengine.c +++ b/src/game_bd/bd_caveengine.c @@ -1298,10 +1298,16 @@ static boolean do_push(GdCave *cave, int x, int y, GdDirection player_move, bool gd_rand_int_range(cave->random, 0, 1000000) < prob) { // if decided that he will be able to push, - store_dir(cave, x, y, twice[player_move], what); play_sound_of_element_pushing(cave, what, x + gd_dx[player_move], y + gd_dy[player_move]); + + // if pushed a stone, it "bounces". all other elements are simply pushed. + if (what == O_STONE) + store_dir(cave, x, y, twice[player_move], cave->stone_bouncing_effect); + else + store_dir(cave, x, y, twice[player_move], what); + result = TRUE; } }