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

[svn] Add Unit::IsWithinCombatDist? function to check melee range and spell range (now range is related to the attacker's bounding_radius and target's combat_reach, not sure if both should be combat_reach).

Original author: megamage
Date: 2008-10-19 14:42:12-05:00

Files:
1 modified

Legend:

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

    r44 r69  
    10571057            if (isAttackReady(BASE_ATTACK)) 
    10581058            { 
    1059                 if(!IsWithinDistInMap(pVictim, pldistance)) 
     1059                if(!IsWithinCombatDist(pVictim, pldistance)) 
    10601060                { 
    10611061                    setAttackTimer(BASE_ATTACK,100); 
     
    10941094            if ( haveOffhandWeapon() && isAttackReady(OFF_ATTACK)) 
    10951095            { 
    1096                 if(!IsWithinDistInMap(pVictim, pldistance)) 
     1096                if(!IsWithinCombatDist(pVictim, pldistance)) 
    10971097                { 
    10981098                    setAttackTimer(OFF_ATTACK,100);