diff --git a/zone/client.h b/zone/client.h index dcf665bab..80053a263 100644 --- a/zone/client.h +++ b/zone/client.h @@ -396,7 +396,7 @@ public: inline float ProximityX() const { return(proximity_x); } inline float ProximityY() const { return(proximity_y); } inline float ProximityZ() const { return(proximity_z); } - inline void ClearAllProximities() { entity_list.ProcessMove(this, FLT_MAX, FLT_MAX, FLT_MAX); proximity_x = FLT_MAX; proximity_y = FLT_MAX; proximity_z = FLT_MAX; } + inline void ClearAllProximities() { entity_list.ProcessMove(this, xyz_location(FLT_MAX, FLT_MAX, FLT_MAX)); proximity_x = FLT_MAX; proximity_y = FLT_MAX; proximity_z = FLT_MAX; } /* Begin client modifiers diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 958834784..31d7a192f 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -4540,7 +4540,7 @@ void Client::Handle_OP_ClientUpdate(const EQApplicationPacket *app) m_RewindLocation = xyz_location(ppu->x_pos, ppu->y_pos, ppu->z_pos); if(proximity_timer.Check()) { - entity_list.ProcessMove(this, ppu->x_pos, ppu->y_pos, ppu->z_pos); + entity_list.ProcessMove(this, xyz_location(ppu->x_pos, ppu->y_pos, ppu->z_pos)); if(RuleB(TaskSystem, EnableTaskSystem) && RuleB(TaskSystem,EnableTaskProximity)) ProcessTaskProximities(ppu->x_pos, ppu->y_pos, ppu->z_pos); proximity_x = ppu->x_pos; diff --git a/zone/entity.cpp b/zone/entity.cpp index baae4913f..b084235eb 100644 --- a/zone/entity.cpp +++ b/zone/entity.cpp @@ -3160,7 +3160,7 @@ struct quest_proximity_event { int area_type; }; -void EntityList::ProcessMove(Client *c, float x, float y, float z) +void EntityList::ProcessMove(Client *c, const xyz_location& location) { float last_x = c->ProximityX(); float last_y = c->ProximityY(); @@ -3182,9 +3182,9 @@ void EntityList::ProcessMove(Client *c, float x, float y, float z) last_z < l->min_z || last_z > l->max_z) { old_in = false; } - if (x < l->min_x || x > l->max_x || - y < l->min_y || y > l->max_y || - z < l->min_z || z > l->max_z) { + if (location.m_X < l->min_x || location.m_X > l->max_x || + location.m_Y < l->min_y || location.m_Y > l->max_y || + location.m_Z < l->min_z || location.m_Z > l->max_z) { new_in = false; } @@ -3217,9 +3217,9 @@ void EntityList::ProcessMove(Client *c, float x, float y, float z) old_in = false; } - if (x < a.min_x || x > a.max_x || - y < a.min_y || y > a.max_y || - z < a.min_z || z > a.max_z ) { + if (location.m_X < a.min_x || location.m_X > a.max_x || + location.m_Y < a.min_y || location.m_Y > a.max_y || + location.m_Z < a.min_z || location.m_Z > a.max_z ) { new_in = false; } diff --git a/zone/entity.h b/zone/entity.h index 9a23bafd0..47bf35be5 100644 --- a/zone/entity.h +++ b/zone/entity.h @@ -198,7 +198,7 @@ public: void MobProcess(); void TrapProcess(); void BeaconProcess(); - void ProcessMove(Client *c, float x, float y, float z); + void ProcessMove(Client *c, const xyz_location& location); void ProcessMove(NPC *n, float x, float y, float z); void AddArea(int id, int type, float min_x, float max_x, float min_y, float max_y, float min_z, float max_z); void RemoveArea(int id); diff --git a/zone/zoning.cpp b/zone/zoning.cpp index b05b6a6e1..4dc99dd2b 100644 --- a/zone/zoning.cpp +++ b/zone/zoning.cpp @@ -652,7 +652,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z else { if(zoneID == GetZoneID()) { //properly handle proximities - entity_list.ProcessMove(this, m_Position.m_X, m_Position.m_Y, m_Position.m_Z); + entity_list.ProcessMove(this, m_Position); proximity_x = m_Position.m_X; proximity_y = m_Position.m_Y; proximity_z = m_Position.m_Z;