aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2008-10-19 14:42:12 -0500
committermegamage <none@none>2008-10-19 14:42:12 -0500
commit672d304a4478afa58d6e094b1bf53ae25b176356 (patch)
tree6c8524a714d9885415249a20274e773be71a10d6 /src/game/Player.cpp
parente7519059c93476d2ea78225d3785ddbf6d607900 (diff)
[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).
--HG-- branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 694c9eafc7b..32413aba503 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -1056,7 +1056,7 @@ void Player::Update( uint32 p_time )
if (isAttackReady(BASE_ATTACK))
{
- if(!IsWithinDistInMap(pVictim, pldistance))
+ if(!IsWithinCombatDist(pVictim, pldistance))
{
setAttackTimer(BASE_ATTACK,100);
if(m_swingErrorMsg != 1) // send single time (client auto repeat)
@@ -1093,7 +1093,7 @@ void Player::Update( uint32 p_time )
if ( haveOffhandWeapon() && isAttackReady(OFF_ATTACK))
{
- if(!IsWithinDistInMap(pVictim, pldistance))
+ if(!IsWithinCombatDist(pVictim, pldistance))
{
setAttackTimer(OFF_ATTACK,100);
}