diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index b81ef24ea..3c440a8ff 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4558,7 +4558,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) } // Update internal state - m_Delta = {ppu->delta_x, ppu->delta_y, ppu->delta_z, ppu->delta_heading}; + m_Delta = xyz_heading(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 diff --git a/zone/client_process.cpp b/zone/client_process.cpp index cf106ae65..14f26f4df 100644 --- a/zone/client_process.cpp +++ b/zone/client_process.cpp @@ -543,7 +543,7 @@ bool Client::Process() { else { animation = 0; - m_Delta = {0.0f, 0.0f, 0.0f, m_Delta.m_Heading}; + m_Delta = xyz_heading(0.0f, 0.0f, 0.0f, m_Delta.m_Heading); SendPosUpdate(2); } } diff --git a/zone/mob.cpp b/zone/mob.cpp index 6574d481d..ac8baa99e 100644 --- a/zone/mob.cpp +++ b/zone/mob.cpp @@ -2944,7 +2944,7 @@ void Mob::TriggerDefensiveProcs(const ItemInst* weapon, Mob *on, uint16 hand, in } void Mob::SetDeltas(float dx, float dy, float dz, float dh) { - m_Delta = {dx,dy,dz,dh}; + m_Delta = xyz_heading(dx,dy,dz,dh); } void Mob::SetEntityVariable(const char *id, const char *m_var) diff --git a/zone/position.cpp b/zone/position.cpp index 9264f18cd..4cb7dfd53 100644 --- a/zone/position.cpp +++ b/zone/position.cpp @@ -6,7 +6,7 @@ xy_location::xy_location(float x, float y) : } const xy_location xy_location::operator -(const xy_location& rhs) { - xy_location minus{m_X - rhs.m_X, m_Y - rhs.m_Y}; + xy_location minus(m_X - rhs.m_X, m_Y - rhs.m_Y); return minus; } @@ -54,23 +54,23 @@ xyz_heading::xyz_heading(const xy_location locationDir, float z, float heading) } xyz_heading::operator xyz_location() const { - return xyz_location{m_X,m_Y,m_Z}; + return xyz_location(m_X,m_Y,m_Z); } xyz_heading::operator xy_location() const { - return xy_location{m_X,m_Y}; + return xy_location(m_X,m_Y); } const xyz_heading xyz_heading::operator +(const xyz_location& rhs) { - return xyz_heading{m_X + rhs.m_X, m_Y + rhs.m_Y, m_Z + rhs.m_Z, m_Heading}; + return xyz_heading(m_X + rhs.m_X, m_Y + rhs.m_Y, m_Z + rhs.m_Z, m_Heading); } const xyz_heading xyz_heading::operator +(const xy_location& rhs) { - return xyz_heading{m_X + rhs.m_X, m_Y + rhs.m_Y, m_Z, m_Heading}; + return xyz_heading(m_X + rhs.m_X, m_Y + rhs.m_Y, m_Z, m_Heading); } const xyz_heading xyz_heading::operator -(const xyz_location& rhs) { - return xyz_heading{m_X - rhs.m_X, m_Y - rhs.m_Y, m_Z - rhs.m_Z, m_Heading}; + return xyz_heading(m_X - rhs.m_X, m_Y - rhs.m_Y, m_Z - rhs.m_Z, m_Heading); } @@ -87,11 +87,11 @@ xyz_location::xyz_location(double x, double y, double z) : } xyz_location::operator xy_location() const { - return xy_location{m_X, m_Y}; + return xy_location(m_X, m_Y); } const xyz_location xyz_location::operator -(const xyz_location& rhs) { - return xyz_location{m_X - rhs.m_X, m_Y - rhs.m_Y, m_Z - rhs.m_Z}; + return xyz_location(m_X - rhs.m_X, m_Y - rhs.m_Y, m_Z - rhs.m_Z); } void xyz_location::ABS_XYZ(void) { diff --git a/zone/waypoints.cpp b/zone/waypoints.cpp index 9dae8d41f..f786eeb57 100644 --- a/zone/waypoints.cpp +++ b/zone/waypoints.cpp @@ -718,7 +718,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b SetMoving(true); moved=true; - m_Delta = {m_Position.m_X - nx, m_Position.m_Y - ny, m_Position.m_Z - nz, 0.0f}; + m_Delta = xyz_heading(m_Position.m_X - nx, m_Position.m_Y - ny, m_Position.m_Z - nz, 0.0f); if (IsClient()) SendPosUpdate(1); @@ -842,7 +842,7 @@ bool Mob::CalculateNewPosition(float x, float y, float z, float speed, bool chec tar_ndx=0; this->SetMoving(true); moved=true; - m_Delta = {m_Position.m_X - nx, m_Position.m_Y - ny, m_Position.m_Z - nz, 0.0f}; + m_Delta = xyz_heading(m_Position.m_X - nx, m_Position.m_Y - ny, m_Position.m_Z - nz, 0.0f); SendPosUpdate(); } tar_ndx++;