summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 0b7bb663d..5586db0b2 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -226,7 +226,7 @@ static int unit_walktoxy_timer(int tid,unsigned int tick,int id,int data)
} else if (ud->target) {
//Update target trajectory.
struct block_list *tbl = map_id2bl(ud->target);
- if (!tbl) { //Cancel chase.
+ if (!tbl || !status_check_visibility(bl, tbl)) { //Cancel chase.
ud->to_x = bl->x;
ud->to_y = bl->y;
return 0;