mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-19 13:28:25 +00:00
Merge pull request #342 from addtheice/data_bundling2
Looks fine on initial review.
This commit is contained in:
+3
-55
@@ -2267,59 +2267,7 @@ bool Mob::CanThisClassBlock(void) const
|
||||
return(CastToClient()->HasSkill(SkillBlock));
|
||||
}
|
||||
}
|
||||
|
||||
float Mob::Dist(const Mob &other) const {
|
||||
float xDiff = other.m_Position.m_X - m_Position.m_X;
|
||||
float yDiff = other.m_Position.m_Y - m_Position.m_Y;
|
||||
float zDiff = other.m_Position.m_Z - m_Position.m_Z;
|
||||
|
||||
return sqrtf( (xDiff * xDiff)
|
||||
+ (yDiff * yDiff)
|
||||
+ (zDiff * zDiff) );
|
||||
}
|
||||
|
||||
float Mob::DistNoZ(const Mob &other) const {
|
||||
float xDiff = other.m_Position.m_X - m_Position.m_X;
|
||||
float yDiff = other.m_Position.m_Y - m_Position.m_Y;
|
||||
|
||||
return sqrtf( (xDiff * xDiff)
|
||||
+ (yDiff * yDiff) );
|
||||
}
|
||||
|
||||
float Mob::DistNoRoot(const Mob &other) const {
|
||||
float xDiff = other.m_Position.m_X - m_Position.m_X;
|
||||
float yDiff = other.m_Position.m_Y - m_Position.m_Y;
|
||||
float zDiff = other.m_Position.m_Z - m_Position.m_Z;
|
||||
|
||||
return ( (xDiff * xDiff)
|
||||
+ (yDiff * yDiff)
|
||||
+ (zDiff * zDiff) );
|
||||
}
|
||||
|
||||
float Mob::DistNoRoot(float x, float y, float z) const {
|
||||
float xDiff = x - m_Position.m_X;
|
||||
float yDiff = y - m_Position.m_Y;
|
||||
float zDiff = z - m_Position.m_Z;
|
||||
|
||||
return ( (xDiff * xDiff)
|
||||
+ (yDiff * yDiff)
|
||||
+ (zDiff * zDiff) );
|
||||
}
|
||||
|
||||
float Mob::DistNoRootNoZ(float x, float y) const {
|
||||
float xDiff = x - m_Position.m_X;
|
||||
float yDiff = y - m_Position.m_Y;
|
||||
|
||||
return ( (xDiff * xDiff) + (yDiff * yDiff) );
|
||||
}
|
||||
|
||||
float Mob::DistNoRootNoZ(const Mob &other) const {
|
||||
float xDiff = other.m_Position.m_X - m_Position.m_X;
|
||||
float yDiff = other.m_Position.m_Y - m_Position.m_Y;
|
||||
|
||||
return ( (xDiff * xDiff) + (yDiff * yDiff) );
|
||||
}
|
||||
|
||||
/*
|
||||
float Mob::GetReciprocalHeading(Mob* target) {
|
||||
float Result = 0;
|
||||
|
||||
@@ -2336,7 +2284,7 @@ float Mob::GetReciprocalHeading(Mob* target) {
|
||||
|
||||
return Result;
|
||||
}
|
||||
|
||||
*/
|
||||
bool Mob::PlotPositionAroundTarget(Mob* target, float &x_dest, float &y_dest, float &z_dest, bool lookForAftArc) {
|
||||
bool Result = false;
|
||||
|
||||
@@ -2344,7 +2292,7 @@ bool Mob::PlotPositionAroundTarget(Mob* target, float &x_dest, float &y_dest, fl
|
||||
float look_heading = 0;
|
||||
|
||||
if(lookForAftArc)
|
||||
look_heading = GetReciprocalHeading(target);
|
||||
look_heading = GetReciprocalHeading(target->GetPosition());
|
||||
else
|
||||
look_heading = target->GetHeading();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user