From 43f598dccf1854eb74723862be4711363a3fed87 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 12 Apr 2007 19:11:42 +0000 Subject: - Oops, it turns out the state is never reset from walking to idle automatically when a mob was random walking... git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10241 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/mob.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/map/mob.c') diff --git a/src/map/mob.c b/src/map/mob.c index ccfc5f53c..4c277de78 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1003,6 +1003,11 @@ int mob_unlocktarget(struct mob_data *md,int tick) mob_script_callback(md, map_id2bl(md->target_id), CALLBACK_UNLOCK); switch (md->state.skillstate) { + case MSS_WALK: + if (md->ud.walktimer != -1) + break; + //Because it is not unset when the mob finishes walking. + md->state.skillstate = MSS_IDLE; case MSS_IDLE: // Idle skill. if (!(++md->ud.walk_count%IDLE_SKILL_INTERVAL) && @@ -1015,8 +1020,6 @@ int mob_unlocktarget(struct mob_data *md,int tick) //Delay next random walk when this one failed. md->next_walktime=tick+rand()%3000; break; - case MSS_WALK: - break; default: mob_stop_attack(md); if (battle_config.mob_ai&0x8) -- cgit v1.2.3-60-g2f50