From e6936d2db256d0feffc858f88ce170b2b766eddd Mon Sep 17 00:00:00 2001 From: Kenpachi Developer Date: Sat, 21 Mar 2020 04:27:08 +0100 Subject: Move misplaced condition in unit_walktobl() function --- src/map/unit.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/map/unit.c b/src/map/unit.c index dd644d8d1..a879a125f 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -728,10 +728,13 @@ static int unit_walktobl(struct block_list *bl, struct block_list *tbl, int rang if(!unit->can_move(bl)) return 0; - if (unit->walk_toxy_sub(bl) == 0 && (flag & 2) != 0) { - set_mobstate(bl); + if (unit->walk_toxy_sub(bl) == 0) { + if ((flag & 2) != 0) + set_mobstate(bl); + return 1; } + return 0; } -- cgit v1.2.3-60-g2f50