From 12fed98fa3e402259a5bc28262a4be096e224521 Mon Sep 17 00:00:00 2001 From: csnv Date: Tue, 15 Oct 2024 23:59:49 +0200 Subject: [PATCH] Fixed one cell movement when dealing with two consecutive units --- src/map/clif.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/map/clif.c b/src/map/clif.c index cf7a83587..0d906b158 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -11838,9 +11838,10 @@ static void clif_parse_WalkToXY(int fd, struct map_session_data *sd) // Do not allow one cell move commands if the target cell is not free if (battle_config.official_cell_stack_limit > 0 - && (sd->bl.x != x || sd->bl.y != y) // Allow current cell - && check_distance_blxy(&sd->bl, x, y, 1) - && map->count_oncell(sd->bl.m, x, y, BL_CHAR | BL_NPC, 0x1 | 0x2) >= battle_config.official_cell_stack_limit) + && sd->bl.x == x + 1 + && sd->bl.y == y + && map->count_oncell(sd->bl.m, x, y, BL_CHAR | BL_NPC, 0x1 | 0x2) >= battle_config.official_cell_stack_limit + && !map->closest_freecell(sd->bl.m, &sd->bl, &x, &y, BL_CHAR | BL_NPC, 0)) return; pc->delinvincibletimer(sd);