Fix issue with heading being incorrectly handled

So we've been doing heading wrong all these years. You will need to run
a script to fix your quests and required SQL to fix DB.

This fixes a ton of random issues with headings and as gives us a better
resolution on headings :P
This commit is contained in:
Michael Cook (mackal)
2018-02-15 18:20:16 -05:00
parent 91d3851d76
commit a32dedeb48
17 changed files with 169 additions and 162 deletions
+5 -5
View File
@@ -4402,7 +4402,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
return;
}
auto boat_delta = glm::vec4(ppu->delta_x, ppu->delta_y, ppu->delta_z, ppu->delta_heading);
auto boat_delta = glm::vec4(ppu->delta_x, ppu->delta_y, ppu->delta_z, EQ10toFloat(ppu->delta_heading));
boat->SetDelta(boat_delta);
auto outapp = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct));
@@ -4412,7 +4412,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
safe_delete(outapp);
/* Update the boat's position on the server, without sending an update */
boat->GMMove(ppu->x_pos, ppu->y_pos, ppu->z_pos, EQ19toFloat(ppu->heading), false);
boat->GMMove(ppu->x_pos, ppu->y_pos, ppu->z_pos, EQ12toFloat(ppu->heading), false);
return;
}
else return;
@@ -4557,7 +4557,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
}
/* Update internal state */
m_Delta = glm::vec4(ppu->delta_x, ppu->delta_y, ppu->delta_z, ppu->delta_heading);
m_Delta = glm::vec4(ppu->delta_x, ppu->delta_y, ppu->delta_z, EQ10toFloat(ppu->delta_heading));
if (IsTracking() && ((m_Position.x != ppu->x_pos) || (m_Position.y != ppu->y_pos))) {
if (zone->random.Real(0, 100) < 70)//should be good
@@ -4610,7 +4610,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
}
}
float new_heading = EQ19toFloat(ppu->heading);
float new_heading = EQ12toFloat(ppu->heading);
int32 new_animation = ppu->animation;
/* Update internal server position from what the client has sent */
@@ -4629,7 +4629,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
if (is_client_moving || new_heading != m_Position.w || new_animation != animation) {
animation = ppu->animation;
m_Position.w = EQ19toFloat(ppu->heading);
m_Position.w = EQ12toFloat(ppu->heading);
/* Broadcast update to other clients */
auto outapp = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct));