mirror of
https://github.com/EQEmu/Server.git
synced 2026-01-27 01:13:53 +00:00
Removed a usage of Mob::DistNoRootNoZ and used ComparativeDistanceNoZ instead
This commit is contained in:
parent
39e059e256
commit
9dc24735a4
@ -9923,7 +9923,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
if ((mypet->GetPetType() == petAnimation && GetAA(aaAnimationEmpathy) >= 2) || mypet->GetPetType() != petAnimation) {
|
||||
if (GetTarget() != this && mypet->DistNoRootNoZ(*GetTarget()) <= (RuleR(Pets, AttackCommandRange)*RuleR(Pets, AttackCommandRange))) {
|
||||
if (GetTarget() != this && ComparativeDistanceNoZ(mypet->GetPosition(), GetTarget()->GetPosition()) <= (RuleR(Pets, AttackCommandRange)*RuleR(Pets, AttackCommandRange))) {
|
||||
if (mypet->IsHeld()) {
|
||||
if (!mypet->IsFocused()) {
|
||||
mypet->SetHeld(false); //break the hold and guard if we explicitly tell the pet to attack.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user