mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 09:31:30 +00:00
tarx, tary, tarz converted to m_TargetLocation as xyz_location
This commit is contained in:
parent
a6177859ff
commit
75543e68e3
@ -99,6 +99,7 @@ Mob::Mob(const char* in_name,
|
||||
gravity_timer(1000),
|
||||
viral_timer(0),
|
||||
m_FearWalkTarget(-999999.0f,-999999.0f,-999999.0f),
|
||||
m_TargetLocation(0.0f, 0.0f, 0.0f),
|
||||
flee_timer(FLEE_CHECK_TIMER)
|
||||
|
||||
{
|
||||
@ -108,9 +109,6 @@ Mob::Mob(const char* in_name,
|
||||
tar_vx=0;
|
||||
tar_vy=0;
|
||||
tar_vz=0;
|
||||
tarx=0;
|
||||
tary=0;
|
||||
tarz=0;
|
||||
curfp = false;
|
||||
|
||||
AI_Init();
|
||||
|
||||
10
zone/mob.h
10
zone/mob.h
@ -399,9 +399,9 @@ public:
|
||||
inline const float GetHeading() const { return m_Position.m_Heading; }
|
||||
inline const float GetSize() const { return size; }
|
||||
inline const float GetBaseSize() const { return base_size; }
|
||||
inline const float GetTarX() const { return tarx; }
|
||||
inline const float GetTarY() const { return tary; }
|
||||
inline const float GetTarZ() const { return tarz; }
|
||||
inline const float GetTarX() const { return m_TargetLocation.m_X; }
|
||||
inline const float GetTarY() const { return m_TargetLocation.m_Y; }
|
||||
inline const float GetTarZ() const { return m_TargetLocation.m_Z; }
|
||||
inline const float GetTarVX() const { return tar_vx; }
|
||||
inline const float GetTarVY() const { return tar_vy; }
|
||||
inline const float GetTarVZ() const { return tar_vz; }
|
||||
@ -1227,9 +1227,7 @@ protected:
|
||||
bool pet_owner_client; //Flags regular and pets as belonging to a client
|
||||
|
||||
EGNode *_egnode; //the EG node we are in
|
||||
float tarx;
|
||||
float tary;
|
||||
float tarz;
|
||||
xyz_location m_TargetLocation;
|
||||
uint8 tar_ndx;
|
||||
float tar_vector;
|
||||
float tar_vx;
|
||||
|
||||
@ -531,7 +531,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
}
|
||||
|
||||
int compare_steps = IsBoat() ? 1 : 20;
|
||||
if(tar_ndx < compare_steps && tarx==x && tary==y) {
|
||||
if(tar_ndx < compare_steps && m_TargetLocation.m_X==x && m_TargetLocation.m_Y==y) {
|
||||
|
||||
float new_x = m_Position.m_X + tar_vx*tar_vector;
|
||||
float new_y = m_Position.m_Y + tar_vy*tar_vector;
|
||||
@ -590,9 +590,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
} else {
|
||||
tar_ndx=0;
|
||||
}
|
||||
tarx=x;
|
||||
tary=y;
|
||||
tarz=z;
|
||||
m_TargetLocation = xyz_location(x, y, z);
|
||||
|
||||
float nx = this->m_Position.m_X;
|
||||
float ny = this->m_Position.m_Y;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user