Skip to content

Commit

Permalink
Fixed bug making the client go into a walk loop when a cell is not re…
Browse files Browse the repository at this point in the history
…achable
  • Loading branch information
csnv committed Oct 29, 2023
1 parent b097666 commit a813120
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/map/clif.c
Original file line number Diff line number Diff line change
Expand Up @@ -11831,9 +11831,14 @@ static void clif_parse_WalkToXY(int fd, struct map_session_data *sd)
if(sd->sc.data[SC_RUN] || sd->sc.data[SC_WUGDASH])
return;

pc->delinvincibletimer(sd);
RFIFOPOS(fd, packet_db[RFIFOW(fd, 0)].pos[0], &x, &y, NULL);

// Do not allow one cell move commands if the target cell is not free
if (battle_config.official_cell_stack_limit > 0
&& check_distance_blxy(&sd->bl, x, y, 1) && map->count_oncell(sd->bl.m, x, y, BL_CHAR | BL_NPC, 1))
return;

RFIFOPOS(fd, packet_db[RFIFOW(fd,0)].pos[0], &x, &y, NULL);
pc->delinvincibletimer(sd);

//Set last idle time... [Skotlex]
pc->update_idle_time(sd, BCIDLE_WALK);
Expand Down

0 comments on commit a813120

Please sign in to comment.