mirror of
https://github.com/EQEmu/Server.git
synced 2026-03-06 14:32:24 +00:00
Removed a usage of Mob::DistNoRoot and used ComparativeDistance instead
This commit is contained in:
parent
80154d0661
commit
0c3efc3c4f
@ -13006,7 +13006,7 @@ void Client::Handle_OP_TargetCommand(const EQApplicationPacket *app)
|
|||||||
|
|
||||||
// For /target, send reject or success packet
|
// For /target, send reject or success packet
|
||||||
if (app->GetOpcode() == OP_TargetCommand) {
|
if (app->GetOpcode() == OP_TargetCommand) {
|
||||||
if (GetTarget() && !GetTarget()->CastToMob()->IsInvisible(this) && (DistNoRoot(*GetTarget()) <= TARGETING_RANGE*TARGETING_RANGE || GetGM())) {
|
if (GetTarget() && !GetTarget()->CastToMob()->IsInvisible(this) && (ComparativeDistance(m_Position, GetTarget()->GetPosition()) <= TARGETING_RANGE*TARGETING_RANGE || GetGM())) {
|
||||||
if (GetTarget()->GetBodyType() == BT_NoTarget2 || GetTarget()->GetBodyType() == BT_Special
|
if (GetTarget()->GetBodyType() == BT_NoTarget2 || GetTarget()->GetBodyType() == BT_Special
|
||||||
|| GetTarget()->GetBodyType() == BT_NoTarget)
|
|| GetTarget()->GetBodyType() == BT_NoTarget)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user