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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/unit.c b/src/map/unit.c
index 7f41f4709..a6edef408 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -1971,8 +1971,8 @@ bool unit_can_reach_bl(struct block_list *bl,struct block_list *tbl, int range,
if (map->getcell(tbl->m,tbl->x-dx,tbl->y-dy,CELL_CHKNOPASS)) {
//Look for a suitable cell to place in.
- for(i=0;i<9 && map->getcell(tbl->m,tbl->x-dirx[i],tbl->y-diry[i],CELL_CHKNOPASS);i++);
- if (i==9) return false; //No valid cells.
+ for(i=0;i<8 && map->getcell(tbl->m,tbl->x-dirx[i],tbl->y-diry[i],CELL_CHKNOPASS);i++);
+ if (i==8) return false; //No valid cells.
dx = dirx[i];
dy = diry[i];
}