summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-12 19:11:42 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-12 19:11:42 +0000
commit43f598dccf1854eb74723862be4711363a3fed87 (patch)
treef39a176a4a0c1e8bc53bc3be2bf63f2823cb6697
parent39028a98e6bfe93f34dd5e87ea0516d4a8a031db (diff)
downloadhercules-43f598dccf1854eb74723862be4711363a3fed87.tar.gz
hercules-43f598dccf1854eb74723862be4711363a3fed87.tar.bz2
hercules-43f598dccf1854eb74723862be4711363a3fed87.tar.xz
hercules-43f598dccf1854eb74723862be4711363a3fed87.zip
- 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
-rw-r--r--src/map/mob.c7
1 files changed, 5 insertions, 2 deletions
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)