diff options
Diffstat (limited to 'src/map/mob.c')
-rw-r--r-- | src/map/mob.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 4c277de78..2b92438c3 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -1025,11 +1025,13 @@ int mob_unlocktarget(struct mob_data *md,int tick) if (battle_config.mob_ai&0x8) mob_stop_walking(md,1); //Inmediately stop chasing. md->state.skillstate = MSS_IDLE; - md->target_id=0; - md->ud.target = 0; md->next_walktime=tick+rand()%3000+3000; break; } + if (md->target_id) { + md->target_id=0; + md->ud.target = 0; + } return 0; } /*========================================== |