mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 17:51:28 +00:00
Removed use of initializer lists. so less pretty
This commit is contained in:
parent
5115a29bb7
commit
65ad5b5c99
@ -4558,7 +4558,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Update internal state
|
// 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(IsTracking() && ((m_Position.m_X!=ppu->x_pos) || (m_Position.m_Y!=ppu->y_pos))){
|
||||||
if(MakeRandomFloat(0, 100) < 70)//should be good
|
if(MakeRandomFloat(0, 100) < 70)//should be good
|
||||||
|
|||||||
@ -543,7 +543,7 @@ bool Client::Process() {
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
animation = 0;
|
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);
|
SendPosUpdate(2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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) {
|
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)
|
void Mob::SetEntityVariable(const char *id, const char *m_var)
|
||||||
|
|||||||
@ -6,7 +6,7 @@ xy_location::xy_location(float x, float y) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
const xy_location xy_location::operator -(const xy_location& rhs) {
|
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;
|
return minus;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,23 +54,23 @@ xyz_heading::xyz_heading(const xy_location locationDir, float z, float heading)
|
|||||||
}
|
}
|
||||||
|
|
||||||
xyz_heading::operator xyz_location() const {
|
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 {
|
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) {
|
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) {
|
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) {
|
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 {
|
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) {
|
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) {
|
void xyz_location::ABS_XYZ(void) {
|
||||||
|
|||||||
@ -718,7 +718,7 @@ bool Mob::MakeNewPositionAndSendUpdate(float x, float y, float z, float speed, b
|
|||||||
SetMoving(true);
|
SetMoving(true);
|
||||||
moved=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())
|
if (IsClient())
|
||||||
SendPosUpdate(1);
|
SendPosUpdate(1);
|
||||||
@ -842,7 +842,7 @@ bool Mob::CalculateNewPosition(float x, float y, float z, float speed, bool chec
|
|||||||
tar_ndx=0;
|
tar_ndx=0;
|
||||||
this->SetMoving(true);
|
this->SetMoving(true);
|
||||||
moved=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();
|
SendPosUpdate();
|
||||||
}
|
}
|
||||||
tar_ndx++;
|
tar_ndx++;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user