From ee785138af2de49b3cc7dde5c5921f46e0ea48c5 Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Tue, 24 Sep 2024 02:12:36 +0200 Subject: [PATCH] fixed smooth movement for player pushing bladder in BD enginen --- src/game_bd/bd_caveengine.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/game_bd/bd_caveengine.c b/src/game_bd/bd_caveengine.c index e3cec549..311da051 100644 --- a/src/game_bd/bd_caveengine.c +++ b/src/game_bd/bd_caveengine.c @@ -1328,20 +1328,20 @@ static boolean do_push(GdCave *cave, int x, int y, GdDirection player_move, bool // pushing bladder down if (is_like_space(cave, x, y, twice[player_move])) { - store_dir(cave, x, y, twice[player_move], O_BLADDER); + store_dir(cave, what_x, what_y, player_move, O_BLADDER); result = TRUE; } // if no space to push down, maybe left (down-left to player) else if (is_like_space(cave, x, y, cw_eighth[grav_compat])) { // left is "down, turned right (cw)" - store_dir(cave, x, y, cw_eighth[grav_compat], O_BLADDER); + store_dir(cave, what_x, what_y, cw_fourth[grav_compat], O_BLADDER); result = TRUE; } // if not, maybe right (down-right to player) else if (is_like_space(cave, x, y, ccw_eighth[grav_compat])) { - store_dir(cave, x, y, ccw_eighth[grav_compat], O_BLADDER); + store_dir(cave, what_x, what_y, ccw_fourth[grav_compat], O_BLADDER); result = TRUE; } } @@ -1356,19 +1356,19 @@ static boolean do_push(GdCave *cave, int x, int y, GdDirection player_move, bool // pushing it left if (is_like_space(cave, x, y, twice[cw_fourth[grav_compat]])) { - store_dir(cave, x, y, twice[cw_fourth[grav_compat]], O_BLADDER); + store_dir(cave, what_x, what_y, player_move, O_BLADDER); result = TRUE; } // maybe down, and player will move left else if (is_like_space(cave, x, y, cw_eighth[grav_compat])) { - store_dir(cave, x, y, cw_eighth[grav_compat], O_BLADDER); + store_dir(cave, what_x, what_y, grav_compat, O_BLADDER); result = TRUE; } // maybe up, and player will move left else if (is_like_space(cave, x, y, cw_eighth[player_move])) { - store_dir(cave, x, y, cw_eighth[player_move], O_BLADDER); + store_dir(cave, what_x, what_y, opposite[grav_compat], O_BLADDER); result = TRUE; } } @@ -1383,19 +1383,19 @@ static boolean do_push(GdCave *cave, int x, int y, GdDirection player_move, bool // pushing it right if (is_like_space(cave, x, y, twice[player_move])) { - store_dir(cave, x, y, twice[player_move], O_BLADDER); + store_dir(cave, what_x, what_y, player_move, O_BLADDER); result = TRUE; } // maybe down, and player will move right else if (is_like_space(cave, x, y, ccw_eighth[grav_compat])) { - store_dir(cave, x, y, ccw_eighth[grav_compat], O_BLADDER); + store_dir(cave, what_x, what_y, grav_compat, O_BLADDER); result = TRUE; } // maybe up, and player will move right else if (is_like_space(cave, x, y, ccw_eighth[player_move])) { - store_dir(cave, x, y, ccw_eighth[player_move], O_BLADDER); + store_dir(cave, what_x, what_y, opposite[grav_compat], O_BLADDER); result = TRUE; } } -- 2.34.1