Switched out our kinda juryrigged vector types for glm::vec types since we use that as a 3d math library already but never switched out the types

This commit is contained in:
KimLS
2015-01-23 00:01:10 -08:00
parent 03286f540a
commit 269d56e1d0
68 changed files with 1524 additions and 1692 deletions
+21 -21
View File
@@ -340,23 +340,23 @@ bool Client::Process() {
if(aa_los_them_mob)
{
if(auto_attack_target != aa_los_them_mob ||
m_AutoAttackPosition.m_X != GetX() ||
m_AutoAttackPosition.m_Y != GetY() ||
m_AutoAttackPosition.m_Z != 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())
m_AutoAttackPosition.x != GetX() ||
m_AutoAttackPosition.y != GetY() ||
m_AutoAttackPosition.z != GetZ() ||
m_AutoAttackTargetLocation.x != aa_los_them_mob->GetX() ||
m_AutoAttackTargetLocation.y != aa_los_them_mob->GetY() ||
m_AutoAttackTargetLocation.z != aa_los_them_mob->GetZ())
{
aa_los_them_mob = auto_attack_target;
m_AutoAttackPosition = GetPosition();
m_AutoAttackTargetLocation = aa_los_them_mob->GetPosition();
m_AutoAttackTargetLocation = glm::vec3(aa_los_them_mob->GetPosition());
los_status = CheckLosFN(auto_attack_target);
los_status_facing = IsFacingMob(aa_los_them_mob);
}
// If only our heading changes, we can skip the CheckLosFN call
// but above we still need to update los_status_facing
if (m_AutoAttackPosition.m_Heading != GetHeading()) {
m_AutoAttackPosition.m_Heading = GetHeading();
if (m_AutoAttackPosition.w != GetHeading()) {
m_AutoAttackPosition.w = GetHeading();
los_status_facing = IsFacingMob(aa_los_them_mob);
}
}
@@ -364,7 +364,7 @@ bool Client::Process() {
{
aa_los_them_mob = auto_attack_target;
m_AutoAttackPosition = GetPosition();
m_AutoAttackTargetLocation = aa_los_them_mob->GetPosition();
m_AutoAttackTargetLocation = glm::vec3(aa_los_them_mob->GetPosition());
los_status = CheckLosFN(auto_attack_target);
los_status_facing = IsFacingMob(aa_los_them_mob);
}
@@ -519,7 +519,7 @@ bool Client::Process() {
else
{
animation = 0;
m_Delta = xyz_heading(0.0f, 0.0f, 0.0f, m_Delta.m_Heading);
m_Delta = glm::vec4(0.0f, 0.0f, 0.0f, m_Delta.w);
SendPosUpdate(2);
}
}
@@ -1601,7 +1601,7 @@ void Client::OPGMTraining(const EQApplicationPacket *app)
return;
//you have to be somewhat close to a trainer to be properly using them
if(ComparativeDistance(m_Position,pTrainer->GetPosition()) > USE_NPC_RANGE2)
if(DistanceSquared(m_Position,pTrainer->GetPosition()) > USE_NPC_RANGE2)
return;
// if this for-loop acts up again (crashes linux), try enabling the before and after #pragmas
@@ -1649,7 +1649,7 @@ void Client::OPGMEndTraining(const EQApplicationPacket *app)
return;
//you have to be somewhat close to a trainer to be properly using them
if(ComparativeDistance(m_Position, pTrainer->GetPosition()) > USE_NPC_RANGE2)
if(DistanceSquared(m_Position, pTrainer->GetPosition()) > USE_NPC_RANGE2)
return;
// goodbye message
@@ -1678,7 +1678,7 @@ void Client::OPGMTrainSkill(const EQApplicationPacket *app)
return;
//you have to be somewhat close to a trainer to be properly using them
if(ComparativeDistance(m_Position, pTrainer->GetPosition()) > USE_NPC_RANGE2)
if(DistanceSquared(m_Position, pTrainer->GetPosition()) > USE_NPC_RANGE2)
return;
if (gmskill->skillbank == 0x01)
@@ -2117,9 +2117,9 @@ void Client::HandleRespawnFromHover(uint32 Option)
if (corpse)
{
m_Position.m_X = corpse->GetX();
m_Position.m_Y = corpse->GetY();
m_Position.m_Z = corpse->GetZ();
m_Position.x = corpse->GetX();
m_Position.y = corpse->GetY();
m_Position.z = corpse->GetZ();
}
EQApplicationPacket* outapp = new EQApplicationPacket(OP_ZonePlayerToBind, sizeof(ZonePlayerToBind_Struct) + 10);
@@ -2172,10 +2172,10 @@ void Client::HandleRespawnFromHover(uint32 Option)
SetMana(GetMaxMana());
SetEndurance(GetMaxEndurance());
m_Position.m_X = chosen->x;
m_Position.m_Y = chosen->y;
m_Position.m_Z = chosen->z;
m_Position.m_Heading = chosen->heading;
m_Position.x = chosen->x;
m_Position.y = chosen->y;
m_Position.z = chosen->z;
m_Position.w = chosen->heading;
ClearHover();
entity_list.RefreshClientXTargets(this);