From a1fddcf716995eddf1c26e1395c8cc24ce6b3eba Mon Sep 17 00:00:00 2001 From: skotlex Date: Tue, 30 May 2006 15:29:17 +0000 Subject: - Small optimization in battle_check_target - Disabled ontouch npcs triggering on hidden/chase-walk characters. - Added the SC* code blocks relevant to SC_AVOID, SC_CHANGE, SC_BLOODLUST, SC_FLEET - Added structure status_data to homun_data - Added handling of BL_HOMUNCULUS in status_heal, status_damage. - Cleaned up the homun-submitted code, moved the relevant code to status_calc_homunculus. - Updated map-server Makefile to compile mercenary.* files. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6847 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pet.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/map/pet.c') diff --git a/src/map/pet.c b/src/map/pet.c index 39e16ea70..2b349daff 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -893,13 +893,14 @@ static int pet_ai_sub_hard(struct pet_data *pd, struct map_session_data *sd, uns return 0; } - if (!check_distance_bl(&sd->bl, &pd->bl, pd->db->range2) && DIFF_TICK(tick, pd->ud.canmove_tick) > 0) { + if (!check_distance_bl(&sd->bl, &pd->bl, pd->db->range2)) { //Master too far, chase. if(pd->target_id) pet_unlocktarget(pd); if(pd->ud.walktimer != -1 && pd->ud.target == sd->bl.id) return 0; //Already walking to him - + if (DIFF_TICK(tick, pd->ud.canmove_tick) < 0) + return 0; //Can't move yet. pd->status.speed = (sd->battle_status.speed>>1); if(pd->status.speed <= 0) pd->status.speed = 1; -- cgit v1.2.3-70-g09d2