Skip to content
Permalink
Browse files

Move misplaced condition in unit_walktobl() function

  • Loading branch information
Kenpachi2k13 committed Mar 21, 2020
1 parent ed5d2d7 commit e6936d2db256d0feffc858f88ce170b2b766eddd
Showing with 5 additions and 2 deletions.
  1. +5 −2 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;
}

0 comments on commit e6936d2

Please sign in to comment.
You can’t perform that action at this time.