diff options
author | Cho <cho@lindenlab.com> | 2013-06-05 23:53:25 +0100 |
---|---|---|
committer | Cho <cho@lindenlab.com> | 2013-06-05 23:53:25 +0100 |
commit | 0e6306e70dd5484cbb5c467a6ffc5f520f511489 (patch) | |
tree | ab452a568932c88645580957065d2ff245d17bfd /indra/newview/llviewermenu.cpp | |
parent | 4d162e1ec2cd716f40666056bb9e2710958e3360 (diff) | |
parent | faf99f2e1c88f281836c555d9fa6886d45f13751 (diff) |
merge
Diffstat (limited to 'indra/newview/llviewermenu.cpp')
-rwxr-xr-x | indra/newview/llviewermenu.cpp | 33 |
1 files changed, 2 insertions, 31 deletions
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index bd5a37876f..471db8d8fc 100755 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -5993,37 +5993,8 @@ void handle_facebook_checkin() std::string slurl_string = slurl.getSLURLString(); std::string region_name = gAgent.getRegion()->getName(); - - //Get the parcel name - LLViewerParcelMgr * parcel = LLViewerParcelMgr::getInstance(); - std::string parcel_title = parcel->getAgentParcelName(); - - //Create the location - LLVector3 agent_pos_region = gAgent.getPositionAgent(); - S32 pos_x = S32(agent_pos_region.mV[VX]); - S32 pos_y = S32(agent_pos_region.mV[VY]); - S32 pos_z = S32(agent_pos_region.mV[VZ]); - - // Round the numbers based on the velocity - F32 velocity_mag_sq = gAgent.getVelocity().magVecSquared(); - - const F32 FLY_CUTOFF = 6.f; // meters/sec - const F32 FLY_CUTOFF_SQ = FLY_CUTOFF * FLY_CUTOFF; - const F32 WALK_CUTOFF = 1.5f; // meters/sec - const F32 WALK_CUTOFF_SQ = WALK_CUTOFF * WALK_CUTOFF; - - if (velocity_mag_sq > FLY_CUTOFF_SQ) - { - pos_x -= pos_x % 4; - pos_y -= pos_y % 4; - } - else if (velocity_mag_sq > WALK_CUTOFF_SQ) - { - pos_x -= pos_x % 2; - pos_y -= pos_y % 2; - } - - std::string description = llformat("%s (%d, %d, %d)", parcel_title.c_str(), pos_x, pos_y, pos_z); + std::string description; + LLAgentUI::buildLocationString(description, LLAgentUI::LOCATION_FORMAT_NORMAL_COORDS, gAgent.getPositionAgent()); LLFacebookConnect::instance().postCheckin(slurl_string, region_name, description, "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQDL4jdC_vCh0ow-QCXZjN-WNojEXWiz0APEa6Qhpl8cxawjkoC7w", ""); } |