aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewermenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewermenu.cpp51
1 files changed, 30 insertions, 21 deletions
diff --git a/linden/indra/newview/llviewermenu.cpp b/linden/indra/newview/llviewermenu.cpp
index 2940bdd..51953b09 100644
--- a/linden/indra/newview/llviewermenu.cpp
+++ b/linden/indra/newview/llviewermenu.cpp
@@ -2106,32 +2106,41 @@ class LLObjectMute : public view_listener_t
2106 2106
2107bool handle_go_to() 2107bool handle_go_to()
2108{ 2108{
2109 // JAMESDEBUG try simulator autopilot
2110 std::vector<std::string> strings;
2111 std::string val;
2112 LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal; 2109 LLVector3d pos = LLToolPie::getInstance()->getPick().mPosGlobal;
2113 val = llformat("%g", pos.mdV[VX]); 2110 if (gSavedSettings.getBOOL("DoubleClickTeleport"))
2114 strings.push_back(val);
2115 val = llformat("%g", pos.mdV[VY]);
2116 strings.push_back(val);
2117 val = llformat("%g", pos.mdV[VZ]);
2118 strings.push_back(val);
2119 send_generic_message("autopilot", strings);
2120
2121 LLViewerParcelMgr::getInstance()->deselectLand();
2122
2123 if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera"))
2124 { 2111 {
2125 gAgent.setFocusGlobal(gAgent.getFocusTargetGlobal(), gAgent.getAvatarObject()->getID()); 2112 LLVector3d hips_offset(0.0f, 0.0f, 1.2f);
2113 gAgent.setControlFlags(AGENT_CONTROL_STAND_UP);
2114 gAgent.teleportViaLocation(pos + hips_offset);
2126 } 2115 }
2127 else 2116 else
2128 { 2117 {
2129 // Snap camera back to behind avatar 2118 // JAMESDEBUG try simulator autopilot
2130 gAgent.setFocusOnAvatar(TRUE, ANIMATE); 2119 std::vector<std::string> strings;
2131 } 2120 std::string val;
2121 val = llformat("%g", pos.mdV[VX]);
2122 strings.push_back(val);
2123 val = llformat("%g", pos.mdV[VY]);
2124 strings.push_back(val);
2125 val = llformat("%g", pos.mdV[VZ]);
2126 strings.push_back(val);
2127 send_generic_message("autopilot", strings);
2128
2129 LLViewerParcelMgr::getInstance()->deselectLand();
2132 2130
2133 // Could be first use 2131 if (gAgent.getAvatarObject() && !gSavedSettings.getBOOL("AutoPilotLocksCamera"))
2134 LLFirstUse::useGoTo(); 2132 {
2133 gAgent.setFocusGlobal(gAgent.getFocusTargetGlobal(), gAgent.getAvatarObject()->getID());
2134 }
2135 else
2136 {
2137 // Snap camera back to behind avatar
2138 gAgent.setFocusOnAvatar(TRUE, ANIMATE);
2139 }
2140
2141 // Could be first use
2142 LLFirstUse::useGoTo();
2143 }
2135 return true; 2144 return true;
2136} 2145}
2137 2146