aa_los_them converted to xyz_location m_AutoAttackTargetLocation

This commit is contained in:
Arthur Ice 2014-12-01 01:23:58 -08:00
parent f973d256dc
commit 5af1998167
4 changed files with 11 additions and 23 deletions

View File

@ -158,7 +158,8 @@ Client::Client(EQStreamInterface* ieqs)
ItemQuestTimer(500), ItemQuestTimer(500),
m_Proximity(FLT_MAX, FLT_MAX, FLT_MAX), //arbitrary large number m_Proximity(FLT_MAX, FLT_MAX, FLT_MAX), //arbitrary large number
m_ZoneSummonLocation(-2.0f,-2.0f,-2.0f), 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++) for(int cf=0; cf < _FilterCount; cf++)
ClientFilters[cf] = FilterShow; ClientFilters[cf] = FilterShow;
@ -276,9 +277,6 @@ Client::Client(EQStreamInterface* ieqs)
m_AssistExemption = 0; m_AssistExemption = 0;
m_CheatDetectMoved = false; m_CheatDetectMoved = false;
CanUseReport = true; CanUseReport = true;
aa_los_them.x = 0;
aa_los_them.y = 0;
aa_los_them.z = 0;
aa_los_them_mob = nullptr; aa_los_them_mob = nullptr;
los_status = false; los_status = false;
los_status_facing = false; los_status_facing = false;

View File

@ -1212,7 +1212,7 @@ protected:
Mob* bind_sight_target; Mob* bind_sight_target;
xyz_heading m_AutoAttackPosition; xyz_heading m_AutoAttackPosition;
Map::Vertex aa_los_them; xyz_location m_AutoAttackTargetLocation;
Mob *aa_los_them_mob; Mob *aa_los_them_mob;
bool los_status; bool los_status;
bool los_status_facing; bool los_status_facing;

View File

@ -3225,9 +3225,7 @@ void Client::Handle_OP_AutoAttack(const EQApplicationPacket *app)
attack_dw_timer.Disable(); attack_dw_timer.Disable();
m_AutoAttackPosition = xyz_heading::Origin(); m_AutoAttackPosition = xyz_heading::Origin();
aa_los_them.x = 0; m_AutoAttackTargetLocation = xyz_location::Origin();
aa_los_them.y = 0;
aa_los_them.z = 0;
aa_los_them_mob = nullptr; aa_los_them_mob = nullptr;
} }
else if (app->pBuffer[0] == 1) else if (app->pBuffer[0] == 1)
@ -3242,18 +3240,14 @@ void Client::Handle_OP_AutoAttack(const EQApplicationPacket *app)
{ {
aa_los_them_mob = GetTarget(); aa_los_them_mob = GetTarget();
m_AutoAttackPosition = GetPosition(); m_AutoAttackPosition = GetPosition();
aa_los_them.x = aa_los_them_mob->GetX(); m_AutoAttackTargetLocation = aa_los_them_mob->GetPosition();
aa_los_them.y = aa_los_them_mob->GetY();
aa_los_them.z = aa_los_them_mob->GetZ();
los_status = CheckLosFN(aa_los_them_mob); los_status = CheckLosFN(aa_los_them_mob);
los_status_facing = IsFacingMob(aa_los_them_mob); los_status_facing = IsFacingMob(aa_los_them_mob);
} }
else else
{ {
m_AutoAttackPosition = GetPosition(); m_AutoAttackPosition = GetPosition();
aa_los_them.x = 0; m_AutoAttackTargetLocation = xyz_location::Origin();
aa_los_them.y = 0;
aa_los_them.z = 0;
aa_los_them_mob = nullptr; aa_los_them_mob = nullptr;
los_status = false; los_status = false;
los_status_facing = false; los_status_facing = false;

View File

@ -357,15 +357,13 @@ bool Client::Process() {
m_AutoAttackPosition.m_X != GetX() || m_AutoAttackPosition.m_X != GetX() ||
m_AutoAttackPosition.m_Y != GetY() || m_AutoAttackPosition.m_Y != GetY() ||
m_AutoAttackPosition.m_Z != GetZ() || m_AutoAttackPosition.m_Z != GetZ() ||
aa_los_them.x != aa_los_them_mob->GetX() || m_AutoAttackTargetLocation.m_X != aa_los_them_mob->GetX() ||
aa_los_them.y != aa_los_them_mob->GetY() || m_AutoAttackTargetLocation.m_Y != aa_los_them_mob->GetY() ||
aa_los_them.z != aa_los_them_mob->GetZ()) m_AutoAttackTargetLocation.m_Z != aa_los_them_mob->GetZ())
{ {
aa_los_them_mob = auto_attack_target; aa_los_them_mob = auto_attack_target;
m_AutoAttackPosition = GetPosition(); m_AutoAttackPosition = GetPosition();
aa_los_them.x = aa_los_them_mob->GetX(); m_AutoAttackTargetLocation = aa_los_them_mob->GetPosition();
aa_los_them.y = aa_los_them_mob->GetY();
aa_los_them.z = aa_los_them_mob->GetZ();
los_status = CheckLosFN(auto_attack_target); los_status = CheckLosFN(auto_attack_target);
los_status_facing = IsFacingMob(aa_los_them_mob); los_status_facing = IsFacingMob(aa_los_them_mob);
} }
@ -380,9 +378,7 @@ bool Client::Process() {
{ {
aa_los_them_mob = auto_attack_target; aa_los_them_mob = auto_attack_target;
m_AutoAttackPosition = GetPosition(); m_AutoAttackPosition = GetPosition();
aa_los_them.x = aa_los_them_mob->GetX(); m_AutoAttackTargetLocation = aa_los_them_mob->GetPosition();
aa_los_them.y = aa_los_them_mob->GetY();
aa_los_them.z = aa_los_them_mob->GetZ();
los_status = CheckLosFN(auto_attack_target); los_status = CheckLosFN(auto_attack_target);
los_status_facing = IsFacingMob(aa_los_them_mob); los_status_facing = IsFacingMob(aa_los_them_mob);
} }