mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-15 16:41:29 +00:00
aa_los_me and aa_los_me_heading converted xyz_heading m_AutoAttackPosition
This commit is contained in:
parent
0a685d316d
commit
f973d256dc
@ -157,7 +157,8 @@ Client::Client(EQStreamInterface* ieqs)
|
|||||||
ItemTickTimer(10000),
|
ItemTickTimer(10000),
|
||||||
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)
|
||||||
{
|
{
|
||||||
for(int cf=0; cf < _FilterCount; cf++)
|
for(int cf=0; cf < _FilterCount; cf++)
|
||||||
ClientFilters[cf] = FilterShow;
|
ClientFilters[cf] = FilterShow;
|
||||||
@ -275,10 +276,6 @@ Client::Client(EQStreamInterface* ieqs)
|
|||||||
m_AssistExemption = 0;
|
m_AssistExemption = 0;
|
||||||
m_CheatDetectMoved = false;
|
m_CheatDetectMoved = false;
|
||||||
CanUseReport = true;
|
CanUseReport = true;
|
||||||
aa_los_me.x = 0;
|
|
||||||
aa_los_me.y = 0;
|
|
||||||
aa_los_me.z = 0;
|
|
||||||
aa_los_me_heading = 0;
|
|
||||||
aa_los_them.x = 0;
|
aa_los_them.x = 0;
|
||||||
aa_los_them.y = 0;
|
aa_los_them.y = 0;
|
||||||
aa_los_them.z = 0;
|
aa_los_them.z = 0;
|
||||||
|
|||||||
@ -1211,11 +1211,10 @@ protected:
|
|||||||
|
|
||||||
Mob* bind_sight_target;
|
Mob* bind_sight_target;
|
||||||
|
|
||||||
Map::Vertex aa_los_me;
|
xyz_heading m_AutoAttackPosition;
|
||||||
Map::Vertex aa_los_them;
|
Map::Vertex aa_los_them;
|
||||||
Mob *aa_los_them_mob;
|
Mob *aa_los_them_mob;
|
||||||
bool los_status;
|
bool los_status;
|
||||||
float aa_los_me_heading;
|
|
||||||
bool los_status_facing;
|
bool los_status_facing;
|
||||||
QGlobalCache *qGlobals;
|
QGlobalCache *qGlobals;
|
||||||
|
|
||||||
|
|||||||
@ -3224,10 +3224,7 @@ void Client::Handle_OP_AutoAttack(const EQApplicationPacket *app)
|
|||||||
ranged_timer.Disable();
|
ranged_timer.Disable();
|
||||||
attack_dw_timer.Disable();
|
attack_dw_timer.Disable();
|
||||||
|
|
||||||
aa_los_me.x = 0;
|
m_AutoAttackPosition = xyz_heading::Origin();
|
||||||
aa_los_me.y = 0;
|
|
||||||
aa_los_me.z = 0;
|
|
||||||
aa_los_me_heading = 0;
|
|
||||||
aa_los_them.x = 0;
|
aa_los_them.x = 0;
|
||||||
aa_los_them.y = 0;
|
aa_los_them.y = 0;
|
||||||
aa_los_them.z = 0;
|
aa_los_them.z = 0;
|
||||||
@ -3244,10 +3241,7 @@ void Client::Handle_OP_AutoAttack(const EQApplicationPacket *app)
|
|||||||
if (GetTarget())
|
if (GetTarget())
|
||||||
{
|
{
|
||||||
aa_los_them_mob = GetTarget();
|
aa_los_them_mob = GetTarget();
|
||||||
aa_los_me.x = GetX();
|
m_AutoAttackPosition = GetPosition();
|
||||||
aa_los_me.y = GetY();
|
|
||||||
aa_los_me.z = GetZ();
|
|
||||||
aa_los_me_heading = GetHeading();
|
|
||||||
aa_los_them.x = aa_los_them_mob->GetX();
|
aa_los_them.x = aa_los_them_mob->GetX();
|
||||||
aa_los_them.y = aa_los_them_mob->GetY();
|
aa_los_them.y = aa_los_them_mob->GetY();
|
||||||
aa_los_them.z = aa_los_them_mob->GetZ();
|
aa_los_them.z = aa_los_them_mob->GetZ();
|
||||||
@ -3256,10 +3250,7 @@ void Client::Handle_OP_AutoAttack(const EQApplicationPacket *app)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aa_los_me.x = GetX();
|
m_AutoAttackPosition = GetPosition();
|
||||||
aa_los_me.y = GetY();
|
|
||||||
aa_los_me.z = GetZ();
|
|
||||||
aa_los_me_heading = GetHeading();
|
|
||||||
aa_los_them.x = 0;
|
aa_los_them.x = 0;
|
||||||
aa_los_them.y = 0;
|
aa_los_them.y = 0;
|
||||||
aa_los_them.z = 0;
|
aa_los_them.z = 0;
|
||||||
|
|||||||
@ -354,38 +354,32 @@ bool Client::Process() {
|
|||||||
if(aa_los_them_mob)
|
if(aa_los_them_mob)
|
||||||
{
|
{
|
||||||
if(auto_attack_target != aa_los_them_mob ||
|
if(auto_attack_target != aa_los_them_mob ||
|
||||||
aa_los_me.x != GetX() ||
|
m_AutoAttackPosition.m_X != GetX() ||
|
||||||
aa_los_me.y != GetY() ||
|
m_AutoAttackPosition.m_Y != GetY() ||
|
||||||
aa_los_me.z != GetZ() ||
|
m_AutoAttackPosition.m_Z != GetZ() ||
|
||||||
aa_los_them.x != aa_los_them_mob->GetX() ||
|
aa_los_them.x != aa_los_them_mob->GetX() ||
|
||||||
aa_los_them.y != aa_los_them_mob->GetY() ||
|
aa_los_them.y != aa_los_them_mob->GetY() ||
|
||||||
aa_los_them.z != aa_los_them_mob->GetZ())
|
aa_los_them.z != aa_los_them_mob->GetZ())
|
||||||
{
|
{
|
||||||
aa_los_them_mob = auto_attack_target;
|
aa_los_them_mob = auto_attack_target;
|
||||||
aa_los_me.x = GetX();
|
m_AutoAttackPosition = GetPosition();
|
||||||
aa_los_me.y = GetY();
|
|
||||||
aa_los_me.z = GetZ();
|
|
||||||
aa_los_them.x = aa_los_them_mob->GetX();
|
aa_los_them.x = aa_los_them_mob->GetX();
|
||||||
aa_los_them.y = aa_los_them_mob->GetY();
|
aa_los_them.y = aa_los_them_mob->GetY();
|
||||||
aa_los_them.z = aa_los_them_mob->GetZ();
|
aa_los_them.z = aa_los_them_mob->GetZ();
|
||||||
los_status = CheckLosFN(auto_attack_target);
|
los_status = CheckLosFN(auto_attack_target);
|
||||||
aa_los_me_heading = GetHeading();
|
|
||||||
los_status_facing = IsFacingMob(aa_los_them_mob);
|
los_status_facing = IsFacingMob(aa_los_them_mob);
|
||||||
}
|
}
|
||||||
// If only our heading changes, we can skip the CheckLosFN call
|
// If only our heading changes, we can skip the CheckLosFN call
|
||||||
// but above we still need to update los_status_facing
|
// but above we still need to update los_status_facing
|
||||||
if (aa_los_me_heading != GetHeading()) {
|
if (m_AutoAttackPosition.m_Heading != GetHeading()) {
|
||||||
aa_los_me_heading = GetHeading();
|
m_AutoAttackPosition.m_Heading = GetHeading();
|
||||||
los_status_facing = IsFacingMob(aa_los_them_mob);
|
los_status_facing = IsFacingMob(aa_los_them_mob);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
aa_los_them_mob = auto_attack_target;
|
aa_los_them_mob = auto_attack_target;
|
||||||
aa_los_me.x = GetX();
|
m_AutoAttackPosition = GetPosition();
|
||||||
aa_los_me.y = GetY();
|
|
||||||
aa_los_me.z = GetZ();
|
|
||||||
aa_los_me_heading = GetHeading();
|
|
||||||
aa_los_them.x = aa_los_them_mob->GetX();
|
aa_los_them.x = aa_los_them_mob->GetX();
|
||||||
aa_los_them.y = aa_los_them_mob->GetY();
|
aa_los_them.y = aa_los_them_mob->GetY();
|
||||||
aa_los_them.z = aa_los_them_mob->GetZ();
|
aa_los_them.z = aa_los_them_mob->GetZ();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user