diff --git a/zone/client_packet.cpp b/zone/client_packet.cpp index 475188975..ad6e3745b 100644 --- a/zone/client_packet.cpp +++ b/zone/client_packet.cpp @@ -1460,9 +1460,10 @@ void Client::Handle_Connect_OP_ZoneEntry(const EQApplicationPacket *app) strcpy(lastname, m_pp.last_name); /* If PP is set to weird coordinates */ if ((m_pp.x == -1 && m_pp.y == -1 && m_pp.z == -1) || (m_pp.x == -2 && m_pp.y == -2 && m_pp.z == -2)) { - m_pp.x = zone->safe_x(); - m_pp.y = zone->safe_y(); - m_pp.z = zone->safe_z(); + auto safePoint = zone->GetSafePoint(); + m_pp.x = safePoint.m_X; + m_pp.y = safePoint.m_Y; + m_pp.z = safePoint.m_Z; } /* If too far below ground, then fix */ // float ground_z = GetGroundZ(m_pp.x, m_pp.y, m_pp.z); diff --git a/zone/zone.h b/zone/zone.h index 32b17c274..7bb1d196e 100644 --- a/zone/zone.h +++ b/zone/zone.h @@ -109,10 +109,7 @@ public: inline Timer* GetInstanceTimer() { return Instance_Timer; } - inline xyz_heading GetSafePoint() { return m_SafePoint; } - inline const float& safe_x() { return m_SafePoint.m_X; } - inline const float& safe_y() { return m_SafePoint.m_Y; } - inline const float& safe_z() { return m_SafePoint.m_Z; } + inline xyz_location GetSafePoint() { return m_SafePoint; } inline const uint32& graveyard_zoneid() { return pgraveyard_zoneid; } inline const float& graveyard_x() { return m_Graveyard.m_X; } inline const float& graveyard_y() { return m_Graveyard.m_Y; } diff --git a/zone/zoning.cpp b/zone/zoning.cpp index 266951f1b..4a22746c8 100644 --- a/zone/zoning.cpp +++ b/zone/zoning.cpp @@ -488,13 +488,15 @@ void Client::ZonePC(uint32 zoneID, uint32 instance_id, float x, float y, float z return; } iZoneNameLength = strlen(pZoneName); + xyz_heading safePoint; switch(zm) { case EvacToSafeCoords: case ZoneToSafeCoords: - x = zone->safe_x(); - y = zone->safe_y(); - z = zone->safe_z(); + safePoint = zone->GetSafePoint(); + x = safePoint.m_X; + y = safePoint.m_Y; + z = safePoint.m_Z; SetHeading(heading); break; case GMSummon: