From 6351693cac9fa5394afcdc784c380946f14d1e56 Mon Sep 17 00:00:00 2001 From: skotlex Date: Thu, 6 Apr 2006 02:21:11 +0000 Subject: - Small fix in the pet_ai git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5918 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pet.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/map') diff --git a/src/map/pet.c b/src/map/pet.c index d9dddbf2f..25f8274c9 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -977,9 +977,12 @@ static int pet_ai_sub_hard(struct pet_data *pd,unsigned int tick) if (pd->target_id) { target= map_id2bl(pd->target_id); - if (!target || pd->bl.m != target->m || target->prev == NULL || + if (!target || pd->bl.m != target->m || status_isdead(target) || !check_distance_bl(&pd->bl, target, pd->db->range3)) + { + target = NULL; pet_unlocktarget(pd); + } } // ペットによるルート -- cgit v1.2.3-70-g09d2