aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llfloaterworldmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'linden/indra/newview/llfloaterworldmap.cpp')
-rw-r--r--linden/indra/newview/llfloaterworldmap.cpp36
1 files changed, 32 insertions, 4 deletions
diff --git a/linden/indra/newview/llfloaterworldmap.cpp b/linden/indra/newview/llfloaterworldmap.cpp
index 213faf0..9257349 100644
--- a/linden/indra/newview/llfloaterworldmap.cpp
+++ b/linden/indra/newview/llfloaterworldmap.cpp
@@ -279,6 +279,13 @@ void LLFloaterWorldMap::onClose(bool app_quitting)
279// static 279// static
280void LLFloaterWorldMap::show(void*, BOOL center_on_target) 280void LLFloaterWorldMap::show(void*, BOOL center_on_target)
281{ 281{
282// [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0c)
283 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWWORLDMAP))
284 {
285 return;
286 }
287// [/RLVa:KB]
288
282 BOOL was_visible = gFloaterWorldMap->getVisible(); 289 BOOL was_visible = gFloaterWorldMap->getVisible();
283 290
284 gFloaterWorldMap->mIsClosing = FALSE; 291 gFloaterWorldMap->mIsClosing = FALSE;
@@ -326,6 +333,7 @@ void LLFloaterWorldMap::show(void*, BOOL center_on_target)
326 333
327 // If nothing is being tracked, set flag so the user position will be found 334 // If nothing is being tracked, set flag so the user position will be found
328 gFloaterWorldMap->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING ); 335 gFloaterWorldMap->mSetToUserPosition = ( LLTracker::getTrackingStatus() == LLTracker::TRACKING_NOTHING );
336
329 } 337 }
330 338
331 if (center_on_target) 339 if (center_on_target)
@@ -452,7 +460,8 @@ void LLFloaterWorldMap::draw()
452 childSetEnabled("Go Home", enable_go_home); 460 childSetEnabled("Go Home", enable_go_home);
453 461
454 updateLocation(); 462 updateLocation();
455 463
464
456 LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus(); 465 LLTracker::ETrackingStatus tracking_status = LLTracker::getTrackingStatus();
457 if (LLTracker::TRACKING_AVATAR == tracking_status) 466 if (LLTracker::TRACKING_AVATAR == tracking_status)
458 { 467 {
@@ -498,7 +507,6 @@ void LLFloaterWorldMap::draw()
498 centerOnTarget(TRUE); 507 centerOnTarget(TRUE);
499 } 508 }
500 509
501 childSetEnabled("Teleport", (BOOL)tracking_status);
502// childSetEnabled("Clear", (BOOL)tracking_status); 510// childSetEnabled("Clear", (BOOL)tracking_status);
503 childSetEnabled("Show Destination", (BOOL)tracking_status || LLWorldMap::getInstance()->mIsTrackingUnknownLocation); 511 childSetEnabled("Show Destination", (BOOL)tracking_status || LLWorldMap::getInstance()->mIsTrackingUnknownLocation);
504 childSetEnabled("copy_slurl", (mSLURL.size() > 0) ); 512 childSetEnabled("copy_slurl", (mSLURL.size() > 0) );
@@ -650,7 +658,10 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
650 F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS ); 658 F32 region_x = (F32)fmod( pos_global.mdV[VX], (F64)REGION_WIDTH_METERS );
651 F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS ); 659 F32 region_y = (F32)fmod( pos_global.mdV[VY], (F64)REGION_WIDTH_METERS );
652 std::string full_name = llformat("%s (%d, %d, %d)", 660 std::string full_name = llformat("%s (%d, %d, %d)",
653 sim_name.c_str(), 661// sim_name.c_str(),
662// [RLVa:KB] - Alternate: Snowglobe-1.0 | Checked: 2009-07-04 (RLVa-1.0.0a)
663 (!gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) ? sim_name.c_str() : rlv_handler_t::cstrHiddenRegion.c_str(),
664// [/RLVa:KB]
654 llround(region_x), 665 llround(region_x),
655 llround(region_y), 666 llround(region_y),
656 llround((F32)pos_global.mdV[VZ])); 667 llround((F32)pos_global.mdV[VZ]));
@@ -704,6 +715,14 @@ void LLFloaterWorldMap::updateLocation()
704 715
705 // Set the current SLURL 716 // Set the current SLURL
706 mSLURL = LLURLDispatcher::buildSLURL(agent_sim_name, agent_x, agent_y, agent_z); 717 mSLURL = LLURLDispatcher::buildSLURL(agent_sim_name, agent_x, agent_y, agent_z);
718
719// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
720 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
721 {
722 childSetValue("location", rlv_handler_t::cstrHiddenRegion);
723 mSLURL.clear();
724 }
725// [/RLVa:KB]
707 } 726 }
708 } 727 }
709 728
@@ -746,13 +765,21 @@ void LLFloaterWorldMap::updateLocation()
746 { // Empty SLURL will disable the "Copy SLURL to clipboard" button 765 { // Empty SLURL will disable the "Copy SLURL to clipboard" button
747 mSLURL = ""; 766 mSLURL = "";
748 } 767 }
768
769// [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0a)
770 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC))
771 {
772 childSetValue("location", rlv_handler_t::cstrHiddenRegion);
773 mSLURL.clear();
774 }
775// [/RLVa:KB]
749 } 776 }
750} 777}
751 778
752void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S32 y_coord, S32 z_coord) 779void LLFloaterWorldMap::trackURL(const std::string& region_name, S32 x_coord, S32 y_coord, S32 z_coord)
753{ 780{
754 LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromName(region_name); 781 LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromName(region_name);
755 z_coord = llclamp(z_coord, 0, 4096); 782 z_coord = llclamp(z_coord, 0, 1000);
756 if (sim_info) 783 if (sim_info)
757 { 784 {
758 LLVector3 local_pos; 785 LLVector3 local_pos;
@@ -1062,6 +1089,7 @@ void LLFloaterWorldMap::onPanBtn( void* userdata )
1062void LLFloaterWorldMap::onGoHome(void*) 1089void LLFloaterWorldMap::onGoHome(void*)
1063{ 1090{
1064 gAgent.teleportHomeConfirm(); 1091 gAgent.teleportHomeConfirm();
1092 gFloaterWorldMap->close();
1065} 1093}
1066 1094
1067 1095