mirror of
https://github.com/EQEmu/Server.git
synced 2026-08-29 16:58:02 +00:00
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:
+6
-6
@@ -674,7 +674,7 @@ void EntityList::AETaunt(Client* taunter, float range)
|
||||
zdiff *= -1;
|
||||
if (zdiff < 10
|
||||
&& taunter->IsAttackAllowed(them)
|
||||
&& ComparativeDistanceNoZ(taunter->GetPosition(), them->GetPosition()) <= range) {
|
||||
&& DistanceSquaredNoZ(taunter->GetPosition(), them->GetPosition()) <= range) {
|
||||
if (taunter->CheckLosFN(them)) {
|
||||
taunter->Taunt(them, true);
|
||||
}
|
||||
@@ -721,10 +721,10 @@ void EntityList::AESpell(Mob *caster, Mob *center, uint16 spell_id, bool affect_
|
||||
continue;
|
||||
|
||||
if (spells[spell_id].targettype == ST_Ring) {
|
||||
dist_targ = ComparativeDistance(static_cast<xyz_location>(curmob->GetPosition()), caster->GetTargetRingLocation());
|
||||
dist_targ = DistanceSquared(static_cast<glm::vec3>(curmob->GetPosition()), caster->GetTargetRingLocation());
|
||||
}
|
||||
else if (center) {
|
||||
dist_targ = ComparativeDistance(curmob->GetPosition(), center->GetPosition());
|
||||
dist_targ = DistanceSquared(curmob->GetPosition(), center->GetPosition());
|
||||
}
|
||||
|
||||
if (dist_targ > dist2) //make sure they are in range
|
||||
@@ -796,7 +796,7 @@ void EntityList::MassGroupBuff(Mob *caster, Mob *center, uint16 spell_id, bool a
|
||||
continue;
|
||||
if (curmob == caster && !affect_caster) //watch for caster too
|
||||
continue;
|
||||
if (ComparativeDistance(center->GetPosition(), curmob->GetPosition()) > dist2) //make sure they are in range
|
||||
if (DistanceSquared(center->GetPosition(), curmob->GetPosition()) > dist2) //make sure they are in range
|
||||
continue;
|
||||
|
||||
//Only npcs mgb should hit are client pets...
|
||||
@@ -838,7 +838,7 @@ void EntityList::AEBardPulse(Mob *caster, Mob *center, uint16 spell_id, bool aff
|
||||
continue;
|
||||
if (curmob == caster && !affect_caster) //watch for caster too
|
||||
continue;
|
||||
if (ComparativeDistance(center->GetPosition(), curmob->GetPosition()) > dist2) //make sure they are in range
|
||||
if (DistanceSquared(center->GetPosition(), curmob->GetPosition()) > dist2) //make sure they are in range
|
||||
continue;
|
||||
if (isnpc && curmob->IsNPC()) { //check npc->npc casting
|
||||
FACTION_VALUE f = curmob->GetReverseFactionCon(caster);
|
||||
@@ -888,7 +888,7 @@ void EntityList::AEAttack(Mob *attacker, float dist, int Hand, int count, bool I
|
||||
&& curmob != attacker //this is not needed unless NPCs can use this
|
||||
&&(attacker->IsAttackAllowed(curmob))
|
||||
&& curmob->GetRace() != 216 && curmob->GetRace() != 472 /* dont attack horses */
|
||||
&& (ComparativeDistance(curmob->GetPosition(), attacker->GetPosition()) <= dist2)
|
||||
&& (DistanceSquared(curmob->GetPosition(), attacker->GetPosition()) <= dist2)
|
||||
) {
|
||||
attacker->Attack(curmob, Hand, false, false, IsFromSpell);
|
||||
hit++;
|
||||
|
||||
Reference in New Issue
Block a user