mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-12 22:01:30 +00:00
EntityList::ProcessMove converted to xyz_location
This commit is contained in:
parent
54f3f7f343
commit
e31c95670a
@ -396,7 +396,7 @@ public:
|
|||||||
inline float ProximityX() const { return(proximity_x); }
|
inline float ProximityX() const { return(proximity_x); }
|
||||||
inline float ProximityY() const { return(proximity_y); }
|
inline float ProximityY() const { return(proximity_y); }
|
||||||
inline float ProximityZ() const { return(proximity_z); }
|
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
|
Begin client modifiers
|
||||||
|
|||||||
@ -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);
|
m_RewindLocation = xyz_location(ppu->x_pos, ppu->y_pos, ppu->z_pos);
|
||||||
|
|
||||||
if(proximity_timer.Check()) {
|
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))
|
if(RuleB(TaskSystem, EnableTaskSystem) && RuleB(TaskSystem,EnableTaskProximity))
|
||||||
ProcessTaskProximities(ppu->x_pos, ppu->y_pos, ppu->z_pos);
|
ProcessTaskProximities(ppu->x_pos, ppu->y_pos, ppu->z_pos);
|
||||||
proximity_x = ppu->x_pos;
|
proximity_x = ppu->x_pos;
|
||||||
|
|||||||
@ -3160,7 +3160,7 @@ struct quest_proximity_event {
|
|||||||
int area_type;
|
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_x = c->ProximityX();
|
||||||
float last_y = c->ProximityY();
|
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) {
|
last_z < l->min_z || last_z > l->max_z) {
|
||||||
old_in = false;
|
old_in = false;
|
||||||
}
|
}
|
||||||
if (x < l->min_x || x > l->max_x ||
|
if (location.m_X < l->min_x || location.m_X > l->max_x ||
|
||||||
y < l->min_y || y > l->max_y ||
|
location.m_Y < l->min_y || location.m_Y > l->max_y ||
|
||||||
z < l->min_z || z > l->max_z) {
|
location.m_Z < l->min_z || location.m_Z > l->max_z) {
|
||||||
new_in = false;
|
new_in = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3217,9 +3217,9 @@ void EntityList::ProcessMove(Client *c, float x, float y, float z)
|
|||||||
old_in = false;
|
old_in = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x < a.min_x || x > a.max_x ||
|
if (location.m_X < a.min_x || location.m_X > a.max_x ||
|
||||||
y < a.min_y || y > a.max_y ||
|
location.m_Y < a.min_y || location.m_Y > a.max_y ||
|
||||||
z < a.min_z || z > a.max_z ) {
|
location.m_Z < a.min_z || location.m_Z > a.max_z ) {
|
||||||
new_in = false;
|
new_in = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -198,7 +198,7 @@ public:
|
|||||||
void MobProcess();
|
void MobProcess();
|
||||||
void TrapProcess();
|
void TrapProcess();
|
||||||
void BeaconProcess();
|
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 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 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);
|
void RemoveArea(int id);
|
||||||
|
|||||||
@ -652,7 +652,7 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z
|
|||||||
else {
|
else {
|
||||||
if(zoneID == GetZoneID()) {
|
if(zoneID == GetZoneID()) {
|
||||||
//properly handle proximities
|
//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_x = m_Position.m_X;
|
||||||
proximity_y = m_Position.m_Y;
|
proximity_y = m_Position.m_Y;
|
||||||
proximity_z = m_Position.m_Z;
|
proximity_z = m_Position.m_Z;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user