summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-11 00:27:15 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-04-11 00:27:15 +0000
commit4fec7fb11ff316e837be25e07ae427d8aa7df460 (patch)
tree632fb4dd7e49d7ff2fa3ff78f45010e6db02a598 /src/map/mob.c
parent7961554a72e475cd71bd34f65bb548c1b13dc685 (diff)
downloadhercules-4fec7fb11ff316e837be25e07ae427d8aa7df460.tar.gz
hercules-4fec7fb11ff316e837be25e07ae427d8aa7df460.tar.bz2
hercules-4fec7fb11ff316e837be25e07ae427d8aa7df460.tar.xz
hercules-4fec7fb11ff316e837be25e07ae427d8aa7df460.zip
- Fixes to the unit_data update that lets characters auto-chase while attacking.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5980 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index bdf2360f2..918acf6a0 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -967,6 +967,7 @@ int mob_unlocktarget(struct mob_data *md,int tick)
md->state.skillstate=MSS_IDLE;
md->next_walktime=tick+rand()%3000+3000;
mob_stop_attack(md);
+ md->ud.attacktarget = md->ud.walktarget = 0;
return 0;
}
/*==========================================
@@ -1182,8 +1183,6 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
mob_unlocktarget(md,tick);
return 0;
}
- if (!can_move) //Wait until you can move?
- return 0;
md->state.skillstate = md->state.aggressive?MSS_FOLLOW:MSS_RUSH;
if (md->ud.walktimer != -1 && md->ud.walktarget == tbl->id &&
(
@@ -1192,7 +1191,7 @@ static int mob_ai_sub_hard(struct block_list *bl,va_list ap)
)) //Current target tile is still within attack range.
return 0;
//Target reachable. Locate suitable spot to move to.
- unit_walktobl(&md->bl, tbl, md->db->range, !battle_config.mob_ai&1);
+ unit_walktobl(&md->bl, tbl, md->db->range, 2|(!battle_config.mob_ai&1));
return 0;
}
//Target within range, engage