mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 22:01:30 +00:00
delta_x, delta_y, delta_z, and int delta_heading converted to m_Delta
This commit is contained in:
parent
53602e3c61
commit
096cbaf1bb
@ -4558,10 +4558,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
// Update internal state
|
||||
delta_x = ppu->delta_x;
|
||||
delta_y = ppu->delta_y;
|
||||
delta_z = ppu->delta_z;
|
||||
delta_heading = ppu->delta_heading;
|
||||
m_Delta = {ppu->delta_x, ppu->delta_y, ppu->delta_z, ppu->delta_heading};
|
||||
|
||||
if(IsTracking() && ((m_Position.m_X!=ppu->x_pos) || (m_Position.m_Y!=ppu->y_pos))){
|
||||
if(MakeRandomFloat(0, 100) < 70)//should be good
|
||||
|
||||
@ -543,9 +543,7 @@ bool Client::Process() {
|
||||
else
|
||||
{
|
||||
animation = 0;
|
||||
delta_x = 0;
|
||||
delta_y = 0;
|
||||
delta_z = 0;
|
||||
m_Delta = {0.0f, 0.0f, 0.0f, m_Delta.m_Heading};
|
||||
SendPosUpdate(2);
|
||||
}
|
||||
}
|
||||
|
||||
18
zone/mob.cpp
18
zone/mob.cpp
@ -255,10 +255,7 @@ Mob::Mob(const char* in_name,
|
||||
}
|
||||
}
|
||||
|
||||
delta_heading = 0;
|
||||
delta_x = 0;
|
||||
delta_y = 0;
|
||||
delta_z = 0;
|
||||
m_Delta = xyz_heading::Origin();
|
||||
animation = 0;
|
||||
|
||||
logging_enabled = false;
|
||||
@ -1233,9 +1230,9 @@ void Mob::MakeSpawnUpdate(PlayerPositionUpdateServer_Struct* spu) {
|
||||
spu->x_pos = FloatToEQ19(m_Position.m_X);
|
||||
spu->y_pos = FloatToEQ19(m_Position.m_Y);
|
||||
spu->z_pos = FloatToEQ19(m_Position.m_Z);
|
||||
spu->delta_x = NewFloatToEQ13(delta_x);
|
||||
spu->delta_y = NewFloatToEQ13(delta_y);
|
||||
spu->delta_z = NewFloatToEQ13(delta_z);
|
||||
spu->delta_x = NewFloatToEQ13(m_Delta.m_X);
|
||||
spu->delta_y = NewFloatToEQ13(m_Delta.m_Y);
|
||||
spu->delta_z = NewFloatToEQ13(m_Delta.m_Z);
|
||||
spu->heading = FloatToEQ19(m_Position.m_Heading);
|
||||
spu->padding0002 =0;
|
||||
spu->padding0006 =7;
|
||||
@ -1245,7 +1242,7 @@ void Mob::MakeSpawnUpdate(PlayerPositionUpdateServer_Struct* spu) {
|
||||
spu->animation = animation;
|
||||
else
|
||||
spu->animation = pRunAnimSpeed;//animation;
|
||||
spu->delta_heading = NewFloatToEQ13(static_cast<float>(delta_heading));
|
||||
spu->delta_heading = NewFloatToEQ13(m_Delta.m_Heading);
|
||||
}
|
||||
|
||||
void Mob::ShowStats(Client* client)
|
||||
@ -2947,10 +2944,7 @@ void Mob::TriggerDefensiveProcs(const ItemInst* weapon, Mob *on, uint16 hand, in
|
||||
}
|
||||
|
||||
void Mob::SetDeltas(float dx, float dy, float dz, float dh) {
|
||||
delta_x = dx;
|
||||
delta_y = dy;
|
||||
delta_z = dz;
|
||||
delta_heading = static_cast<int>(dh);
|
||||
m_Delta = {dx,dy,dz,dh};
|
||||
}
|
||||
|
||||
void Mob::SetEntityVariable(const char *id, const char *m_var)
|
||||
|
||||
@ -421,7 +421,7 @@ public:
|
||||
//Movement
|
||||
void Warp( float x, float y, float z );
|
||||
inline bool IsMoving() const { return moving; }
|
||||
virtual void SetMoving(bool move) { moving = move; delta_x = 0; delta_y = 0; delta_z = 0; delta_heading = 0; }
|
||||
virtual void SetMoving(bool move) { moving = move; m_Delta = xyz_heading::Origin(); }
|
||||
virtual void GoToBind(uint8 bindnum = 0) { }
|
||||
virtual void Gate();
|
||||
float GetWalkspeed() const { return(_GetMovementSpeed(-47)); }
|
||||
@ -1047,10 +1047,7 @@ protected:
|
||||
char clean_name[64];
|
||||
char lastname[64];
|
||||
|
||||
int32 delta_heading;
|
||||
float delta_x;
|
||||
float delta_y;
|
||||
float delta_z;
|
||||
xyz_heading m_Delta;
|
||||
|
||||
uint8 light;
|
||||
|
||||
|
||||
@ -493,10 +493,7 @@ void Mob::AI_Start(uint32 iMoveDelay) {
|
||||
pAssistRange = 70;
|
||||
hate_list.Wipe();
|
||||
|
||||
delta_heading = 0;
|
||||
delta_x = 0;
|
||||
delta_y = 0;
|
||||
delta_z = 0;
|
||||
m_Delta = xyz_heading::Origin();
|
||||
pRunAnimSpeed = 0;
|
||||
pLastChange = Timer::GetCurrentTime();
|
||||
}
|
||||
|
||||
@ -718,10 +718,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
||||
SetMoving(true);
|
||||
moved=true;
|
||||
|
||||
delta_x=m_Position.m_X-nx;
|
||||
delta_y=m_Position.m_Y-ny;
|
||||
delta_z=m_Position.m_Z-nz;
|
||||
delta_heading=0;
|
||||
m_Delta = {m_Position.m_X - nx, m_Position.m_Y - ny, m_Position.m_Z - nz, 0.0f};
|
||||
|
||||
if (IsClient())
|
||||
SendPosUpdate(1);
|
||||
@ -845,10 +842,7 @@ bool Mob::CalculateNewPosition(float x, float y, float z, float speed, bool chec
|
||||
tar_ndx=0;
|
||||
this->SetMoving(true);
|
||||
moved=true;
|
||||
delta_x=(m_Position.m_X-nx);
|
||||
delta_y=(m_Position.m_Y-ny);
|
||||
delta_z=(m_Position.m_Z-nz);
|
||||
delta_heading=0;//(heading-nh)*8;
|
||||
m_Delta = {m_Position.m_X - nx, m_Position.m_Y - ny, m_Position.m_Z - nz, 0.0f};
|
||||
SendPosUpdate();
|
||||
}
|
||||
tar_ndx++;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user