Skip to content

Commit

Permalink
Merge pull request #23 from csnv/fix/walk-xy-restoration
Browse files Browse the repository at this point in the history
Fixed single cell movement when dealing with two consecutive units
  • Loading branch information
csnv authored Oct 15, 2024
2 parents 147957c + 12fed98 commit e9ab868
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/map/clif.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit e9ab868

Please sign in to comment.