summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index c05f4c4a2..2605b414f 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -1303,8 +1303,8 @@ int mob_unlocktarget(struct mob_data *md, int64 tick) {
md->ud.target_to = 0;
unit->set_target(&md->ud, 0);
}
- if(map->count_oncell(md->bl.m, md->bl.x, md->bl.y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) {
- unit->walktoxy(&md->bl, md->bl.x, md->bl.y, 8);
+ if(map->count_oncell(md->bl.m, md->bl.x, md->bl.y, BL_CHAR|BL_NPC, 1) > battle_config.official_cell_stack_limit) {
+ unit->walktoxy(&md->bl, md->bl.x, md->bl.y, 8);
}
return 0;
@@ -1433,8 +1433,8 @@ bool mob_ai_sub_hard(struct mob_data *md, int64 tick) {
//No valid target
if (mob->warpchase(md, tbl))
return true; //Chasing this target.
- if(md->ud.walktimer != INVALID_TIMER && (!can_move || md->ud.walkpath.path_pos <= battle_config.mob_chase_refresh)
- && (tbl || md->ud.walkpath.path_pos == 0))
+ if(md->ud.walktimer != INVALID_TIMER && (!can_move || md->ud.walkpath.path_pos <= battle_config.mob_chase_refresh)
+ && (tbl || md->ud.walkpath.path_pos == 0))
return true; //Walk at least "mob_chase_refresh" cells before dropping the target unless target is non-existent
mob_unlocktarget(md, tick); //Unlock target
tbl = NULL;