EntityList::ProcessMove converted to xyz_location

This commit is contained in:
Arthur Ice 2014-11-30 23:50:24 -08:00
parent 54f3f7f343
commit e31c95670a
5 changed files with 11 additions and 11 deletions

View File

@ -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

View File

@ -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;

View File

@ -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;
}

View File

@ -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);

View File

@ -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;