mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-26 19:47:16 +00:00
Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead
This commit is contained in:
@@ -769,7 +769,7 @@ void Client::RangedAttack(Mob* other, bool CanDoubleAttack) {
|
|||||||
float range = RangeItem->Range + AmmoItem->Range + GetRangeDistTargetSizeMod(GetTarget());
|
float range = RangeItem->Range + AmmoItem->Range + GetRangeDistTargetSizeMod(GetTarget());
|
||||||
mlog(COMBAT__RANGED, "Calculated bow range to be %.1f", range);
|
mlog(COMBAT__RANGED, "Calculated bow range to be %.1f", range);
|
||||||
range *= range;
|
range *= range;
|
||||||
float dist = DistNoRoot(*other);
|
float dist = ComparativeDistance(m_Position, other->GetPosition());
|
||||||
if(dist > range) {
|
if(dist > range) {
|
||||||
mlog(COMBAT__RANGED, "Ranged attack out of range... client should catch this. (%f > %f).\n", dist, range);
|
mlog(COMBAT__RANGED, "Ranged attack out of range... client should catch this. (%f > %f).\n", dist, range);
|
||||||
Message_StringID(13,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
|
Message_StringID(13,TARGET_OUT_OF_RANGE);//Client enforces range and sends the message, this is a backup just incase.
|
||||||
|
|||||||
Reference in New Issue
Block a user