Show
Ignore:
Timestamp:
11/19/08 13:41:28 (17 years ago)
Author:
yumileroy
Message:

[svn] Use IsWithinCombatDist? for all AI. This should fix the bug that pet and guard does not attack target. (Note: some scriptedAI may need to update)

Original author: megamage
Date: 2008-11-03 14:11:09-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/PetAI.cpp

    r135 r156  
    165165            } 
    166166            // not required to be stopped case 
    167             else if( i_pet.isAttackReady() && i_pet.canReachWithAttack(i_pet.getVictim()) ) 
     167            else if( i_pet.isAttackReady() && i_pet.IsWithinCombatDist(i_pet.getVictim(), ATTACK_DISTANCE) ) 
    168168            { 
    169169                i_pet.AttackerStateUpdate(i_pet.getVictim());