*Update melee range calculation. By QAston.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-05 18:39:31 -06:00
parent d36672cd7e
commit 3a1293ef18
34 changed files with 93 additions and 138 deletions
+2 -4
View File
@@ -1106,11 +1106,9 @@ void Player::Update( uint32 p_time )
// default combat reach 10
// TODO add weapon,skill check
float pldistance = ATTACK_DISTANCE;
if (isAttackReady(BASE_ATTACK))
{
if(!IsWithinCombatDist(pVictim, pldistance))
if(!IsWithinMeleeRange(pVictim))
{
setAttackTimer(BASE_ATTACK,100);
if(m_swingErrorMsg != 1) // send single time (client auto repeat)
@@ -1147,7 +1145,7 @@ void Player::Update( uint32 p_time )
if ( haveOffhandWeapon() && isAttackReady(OFF_ATTACK))
{
if(!IsWithinCombatDist(pVictim, pldistance))
if(!IsWithinMeleeRange(pVictim))
{
setAttackTimer(OFF_ATTACK,100);
}