summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorskyleo <skyleo@skyleo.de>2019-09-12 00:33:54 +0200
committerHaru <haru@dotalux.com>2020-03-08 20:56:28 +0100
commit0817191184bd867836a7fcc30d65305b10964a5f (patch)
tree913c74483d2a29bb6a27a06affec9d573ec6316f /src/map/mob.c
parent43bc7911460a53a2ebed4b54d81c473b9e6567b8 (diff)
downloadhercules-0817191184bd867836a7fcc30d65305b10964a5f.tar.gz
hercules-0817191184bd867836a7fcc30d65305b10964a5f.tar.bz2
hercules-0817191184bd867836a7fcc30d65305b10964a5f.tar.xz
hercules-0817191184bd867836a7fcc30d65305b10964a5f.zip
Change returning error-code in unit->walktoxy to obey code-style guidelines
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c6
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++;