[Bug] Pets should not ignore Z axis (#3912)

Ignoring the Z axis allows you to attack mobs on target from wildly inappropriate Z distances.

Example you can pull mobs to the cy in bothunder from the towers you are under when many 1000's of units away by Z only.
This commit is contained in:
Fryguy 2024-01-08 02:41:51 -05:00 committed by GitHub
parent b2d5007466
commit 195cb80d56
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10766,7 +10766,7 @@ void Client::Handle_OP_PetCommands(const EQApplicationPacket *app)
}
if ((mypet->GetPetType() == petAnimation && aabonuses.PetCommands[PetCommand]) || mypet->GetPetType() != petAnimation) {
if (target != this && DistanceSquaredNoZ(mypet->GetPosition(), target->GetPosition()) <= (RuleR(Pets, AttackCommandRange)*RuleR(Pets, AttackCommandRange))) {
if (target != this && DistanceSquared(mypet->GetPosition(), target->GetPosition()) <= (RuleR(Pets, AttackCommandRange)*RuleR(Pets, AttackCommandRange))) {
mypet->SetFeigned(false);
if (mypet->IsPetStop()) {
mypet->SetPetStop(false);