diff options
| author | megamage <none@none> | 2008-12-04 23:00:35 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2008-12-04 23:00:35 -0600 |
| commit | d36672cd7e4ae3d328f30c020c5421668ad4cb5e (patch) | |
| tree | 572ff4758483da0d2d723ab33e028d48670de76e /src/game/Unit.cpp | |
| parent | 450c0a45b87fb043f39298cf94c7f7254ade2fc5 (diff) | |
*Update spell range calculation. Original patch by QAston.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
| -rw-r--r-- | src/game/Unit.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 257b3dffd8d..2f0e5a1fe43 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -443,14 +443,13 @@ bool Unit::IsWithinCombatDist(Unit *obj, float dist2compare) const void Unit::GetRandomContactPoint( const Unit* obj, float &x, float &y, float &z, float distance2dMin, float distance2dMax ) const { - //assert(GetCombatReach() > 0.1); float combat_reach = GetCombatReach(); - if(combat_reach < 0.1) + if(combat_reach < 0.1) // sometimes bugged for players { sLog.outError("Unit %u (Type: %u) has invalid combat_reach %f",GetGUIDLow(),GetTypeId(),combat_reach); if(GetTypeId() == TYPEID_UNIT) sLog.outError("Creature entry %u has invalid combat_reach", ((Creature*)this)->GetEntry()); - combat_reach = 0.5; + combat_reach = DEFAULT_COMBAT_REACH; } uint32 attacker_number = getAttackers().size(); if(attacker_number > 0) --attacker_number; |
