diff options
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 0830e5a5a..431bdbe0d 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1462,7 +1462,7 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md, int64 tick) // If master is BL_MOB and in battle, lock & chase to master's target instead, unless configured not to. if ((battle_config.slave_chase_masters_chasetarget == 0 || (m_md != NULL && !mob->is_in_battle_state(m_md))) && map->search_freecell(&md->bl, bl->m, &x, &y, MOB_SLAVEDISTANCE, MOB_SLAVEDISTANCE, 1) - && unit->walktoxy(&md->bl, x, y, 0)) + && unit->walktoxy(&md->bl, x, y, 0) == 0) return 1; } } else if (bl->m != md->bl.m && map_flag_gvg(md->bl.m)) { @@ -1576,9 +1576,9 @@ static int mob_randomwalk(struct mob_data *md, int64 tick) x+=md->bl.x; y+=md->bl.y; - if (((x != md->bl.x) || (y != md->bl.y)) && map->getcell(md->bl.m, &md->bl, x, y, CELL_CHKPASS) && unit->walktoxy(&md->bl, x, y, 8)) { + if ((x != md->bl.x || y != md->bl.y) && map->getcell(md->bl.m, &md->bl, x, y, CELL_CHKPASS) != 0 + && unit->walktoxy(&md->bl, x, y, 8) == 0) break; - } } if(i==retrycount){ md->move_fail_count++; |