mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 18:52:22 +00:00
Merge branch 'master' into auras
This commit is contained in:
@@ -4600,14 +4600,14 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
|
||||
}
|
||||
}
|
||||
|
||||
float new_heading = EQ19toFloat(ppu->heading);
|
||||
int32 new_animation = ppu->animation;
|
||||
|
||||
/* Update internal server position from what the client has sent */
|
||||
m_Position.x = ppu->x_pos;
|
||||
m_Position.y = ppu->y_pos;
|
||||
m_Position.z = ppu->z_pos;
|
||||
m_Position.w = EQ19toFloat(ppu->heading);
|
||||
|
||||
animation = ppu->animation;
|
||||
|
||||
/* Visual Debugging */
|
||||
if (RuleB(Character, OPClientUpdateVisualDebug)) {
|
||||
Log(Logs::General, Logs::Debug, "ClientUpdate: ppu x: %f y: %f z: %f h: %u", ppu->x_pos, ppu->y_pos, ppu->z_pos, ppu->heading);
|
||||
@@ -4616,7 +4616,10 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app)
|
||||
}
|
||||
|
||||
/* Only feed real time updates when client is moving */
|
||||
if (is_client_moving) {
|
||||
if (is_client_moving || new_heading != m_Position.w || new_animation != animation) {
|
||||
|
||||
animation = ppu->animation;
|
||||
m_Position.w = EQ19toFloat(ppu->heading);
|
||||
|
||||
/* Broadcast update to other clients */
|
||||
auto outapp = new EQApplicationPacket(OP_ClientUpdate, sizeof(PlayerPositionUpdateServer_Struct));
|
||||
|
||||
+6
-6
@@ -759,7 +759,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa
|
||||
Log(Logs::Detail, Logs::None, " Distance between From and To (NoRoot) is %8.3f", Distance);
|
||||
|
||||
if ((Distance <= RuleR(Pathing, MinDistanceForLOSCheckShort)) &&
|
||||
(std::abs(From.z - To.z) <= RuleR(Pathing, ZDiffThreshold))) {
|
||||
(std::abs(From.z - To.z) <= RuleR(Pathing, ZDiffThresholdNew))) {
|
||||
if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, nullptr))
|
||||
PathingLOSState = HaveLOS;
|
||||
else
|
||||
@@ -851,7 +851,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa
|
||||
Log(Logs::Detail, Logs::None, " Distance between From and To (NoRoot) is %8.3f", Distance);
|
||||
|
||||
if ((Distance <= RuleR(Pathing, MinDistanceForLOSCheckShort)) &&
|
||||
(std::abs(From.z - To.z) <= RuleR(Pathing, ZDiffThreshold))) {
|
||||
(std::abs(From.z - To.z) <= RuleR(Pathing, ZDiffThresholdNew))) {
|
||||
if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, nullptr))
|
||||
PathingLOSState = HaveLOS;
|
||||
else
|
||||
@@ -888,7 +888,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa
|
||||
float Distance = VectorDistanceNoRoot(From, To);
|
||||
|
||||
if ((Distance <= RuleR(Pathing, MinDistanceForLOSCheckShort)) &&
|
||||
(std::abs(From.z - To.z) <= RuleR(Pathing, ZDiffThreshold))) {
|
||||
(std::abs(From.z - To.z) <= RuleR(Pathing, ZDiffThresholdNew))) {
|
||||
Log(Logs::Detail, Logs::None, " Checking for short LOS at distance %8.3f.", Distance);
|
||||
if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, nullptr))
|
||||
PathingLOSState = HaveLOS;
|
||||
@@ -1039,7 +1039,7 @@ glm::vec3 Mob::UpdatePath(float ToX, float ToY, float ToZ, float Speed, bool &Wa
|
||||
float Distance = VectorDistanceNoRoot(From, To);
|
||||
|
||||
if ((Distance <= RuleR(Pathing, MinDistanceForLOSCheckLong)) &&
|
||||
(std::abs(From.z - To.z) <= RuleR(Pathing, ZDiffThreshold))) {
|
||||
(std::abs(From.z - To.z) <= RuleR(Pathing, ZDiffThresholdNew))) {
|
||||
Log(Logs::Detail, Logs::None, " Checking for long LOS at distance %8.3f.", Distance);
|
||||
|
||||
if(!zone->zonemap->LineIntersectsZone(HeadPosition, To, 1.0f, nullptr))
|
||||
@@ -1143,7 +1143,7 @@ bool PathManager::NoHazards(glm::vec3 From, glm::vec3 To)
|
||||
|
||||
float NewZ = zone->zonemap->FindBestZ(MidPoint, nullptr);
|
||||
|
||||
if (std::abs(NewZ - From.z) > RuleR(Pathing, ZDiffThreshold)) {
|
||||
if (std::abs(NewZ - From.z) > RuleR(Pathing, ZDiffThresholdNew)) {
|
||||
Log(Logs::Detail, Logs::None, " HAZARD DETECTED moving from %8.3f, %8.3f, %8.3f to %8.3f, %8.3f, %8.3f. Z Change is %8.3f",
|
||||
From.x, From.y, From.z, MidPoint.x, MidPoint.y, MidPoint.z, NewZ - From.z);
|
||||
|
||||
@@ -1215,7 +1215,7 @@ bool PathManager::NoHazardsAccurate(glm::vec3 From, glm::vec3 To)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (std::abs(NewZ - best_z2) > RuleR(Pathing, ZDiffThreshold)) {
|
||||
if (std::abs(NewZ - best_z2) > RuleR(Pathing, ZDiffThresholdNew)) {
|
||||
Log(Logs::Detail, Logs::None,
|
||||
" HAZARD DETECTED, water is fairly deep at %8.3f units deep",
|
||||
std::abs(NewZ - best_z2));
|
||||
|
||||
Reference in New Issue
Block a user