diff options
| author | megamage <none@none> | 2008-12-06 10:44:53 -0600 |
|---|---|---|
| committer | megamage <none@none> | 2008-12-06 10:44:53 -0600 |
| commit | 8ffc1a6e4ce588cdf9b54e26616c4a92729f7ffd (patch) | |
| tree | 1be374af9055b2497de315cef231632218c1fb7e /src/game/Unit.cpp | |
| parent | 8685659d6bf6f56805753c1507e025213395b480 (diff) | |
*Apply range mod also for melee spells.
--HG--
branch : trunk
Diffstat (limited to 'src/game/Unit.cpp')
| -rw-r--r-- | src/game/Unit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 862c9a6c2eb..36ba1af2e3c 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -435,7 +435,7 @@ bool Unit::IsWithinCombatRange(Unit *obj, float dist2compare) const return distsq < maxdist * maxdist; } -bool Unit::IsWithinMeleeRange(Unit *obj) const +bool Unit::IsWithinMeleeRange(Unit *obj, float dist) const { if (!obj || !IsInMap(obj)) return false; @@ -445,7 +445,7 @@ bool Unit::IsWithinMeleeRange(Unit *obj) const float distsq = dx*dx + dy*dy + dz*dz; float sizefactor = GetMeleeReach() + obj->GetMeleeReach(); - float maxdist = MELEE_RANGE + sizefactor; + float maxdist = dist + sizefactor; return distsq < maxdist * maxdist; } |
