From 5af1998167fc232a6549587b92389deebb9f1e6e Mon Sep 17 00:00:00 2001 From: Arthur Ice Date: Mon, 1 Dec 2014 01:23:58 -0800 Subject: [PATCH] aa_los_them converted to xyz_location m_AutoAttackTargetLocation --- zone/client.cpp | 6 ++---- zone/client.h | 2 +- zone/client_packet.cpp | 12 +++--------- zone/client_process.cpp | 14 +++++--------- 4 files changed, 11 insertions(+), 23 deletions(-) diff --git a/zone/client.cpp b/zone/client.cpp index c4aab1733..e2ec14178 100644 --- a/zone/client.cpp +++ b/zone/client.cpp @@ -158,7 +158,8 @@ Client::Client(EQStreamInterface* ieqs) ItemQuestTimer(500), m_Proximity(FLT_MAX, FLT_MAX, FLT_MAX), //arbitrary large number m_ZoneSummonLocation(-2.0f,-2.0f,-2.0f), - m_AutoAttackPosition(0.0f, 0.0f, 0.0f, 0.0f) + m_AutoAttackPosition(0.0f, 0.0f, 0.0f, 0.0f), + m_AutoAttackTargetLocation(0.0f, 0.0f, 0.0f) { for(int cf=0; cf < _FilterCount; cf++) ClientFilters[cf] = FilterShow; @@ -276,9 +277,6 @@ Client::Client(EQStreamInterface* ieqs) m_AssistExemption = 0; m_CheatDetectMoved = false; CanUseReport = true; - aa_los_them.x = 0; - aa_los_them.y = 0; - aa_los_them.z = 0; aa_los_them_mob = nullptr; los_status = false; los_status_facing = false; diff --git a/zone/client.h b/zone/client.h index ad2414d60..004adfede 100644 --- a/zone/client.h +++ b/zone/client.h @@ -1212,7 +1212,7 @@ protected: Mob* bind_sight_target; xyz_heading m_AutoAttackPosition; - Map::Vertex aa_los_them; + xyz_location m_AutoAttackTargetLocation; Mob *aa_los_them_mob; bool los_status; bool los_status_facing; diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index fbbce9e83..475188975 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -3225,9 +3225,7 @@ void Client::Handle_OP_AutoAttack(const EQApplicationPacket *app) attack_dw_timer.Disable(); m_AutoAttackPosition = xyz_heading::Origin(); - aa_los_them.x = 0; - aa_los_them.y = 0; - aa_los_them.z = 0; + m_AutoAttackTargetLocation = xyz_location::Origin(); aa_los_them_mob = nullptr; } else if (app->pBuffer[0] == 1) @@ -3242,18 +3240,14 @@ void Client::Handle_OP_AutoAttack(const EQApplicationPacket *app) { aa_los_them_mob = GetTarget(); m_AutoAttackPosition = GetPosition(); - aa_los_them.x = aa_los_them_mob->GetX(); - aa_los_them.y = aa_los_them_mob->GetY(); - aa_los_them.z = aa_los_them_mob->GetZ(); + m_AutoAttackTargetLocation = aa_los_them_mob->GetPosition(); los_status = CheckLosFN(aa_los_them_mob); los_status_facing = IsFacingMob(aa_los_them_mob); } else { m_AutoAttackPosition = GetPosition(); - aa_los_them.x = 0; - aa_los_them.y = 0; - aa_los_them.z = 0; + m_AutoAttackTargetLocation = xyz_location::Origin(); aa_los_them_mob = nullptr; los_status = false; los_status_facing = false; diff --git a/zone/client_process.cpp b/zone/client_process.cpp index 22498e4ab..7d2bac2c9 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -357,15 +357,13 @@ bool Client::Process() { m_AutoAttackPosition.m_X != GetX() || m_AutoAttackPosition.m_Y != GetY() || m_AutoAttackPosition.m_Z != GetZ() || - aa_los_them.x != aa_los_them_mob->GetX() || - aa_los_them.y != aa_los_them_mob->GetY() || - aa_los_them.z != aa_los_them_mob->GetZ()) + m_AutoAttackTargetLocation.m_X != aa_los_them_mob->GetX() || + m_AutoAttackTargetLocation.m_Y != aa_los_them_mob->GetY() || + m_AutoAttackTargetLocation.m_Z != aa_los_them_mob->GetZ()) { aa_los_them_mob = auto_attack_target; m_AutoAttackPosition = GetPosition(); - aa_los_them.x = aa_los_them_mob->GetX(); - aa_los_them.y = aa_los_them_mob->GetY(); - aa_los_them.z = aa_los_them_mob->GetZ(); + m_AutoAttackTargetLocation = aa_los_them_mob->GetPosition(); los_status = CheckLosFN(auto_attack_target); los_status_facing = IsFacingMob(aa_los_them_mob); } @@ -380,9 +378,7 @@ bool Client::Process() { { aa_los_them_mob = auto_attack_target; m_AutoAttackPosition = GetPosition(); - aa_los_them.x = aa_los_them_mob->GetX(); - aa_los_them.y = aa_los_them_mob->GetY(); - aa_los_them.z = aa_los_them_mob->GetZ(); + m_AutoAttackTargetLocation = aa_los_them_mob->GetPosition(); los_status = CheckLosFN(auto_attack_target); los_status_facing = IsFacingMob(aa_los_them_mob); }