diff --git a/indra/newview/alchatcommand.cpp b/indra/newview/alchatcommand.cpp index 13d42bef881ee3edd66a176656b7db9a124cc4e4..99e903a5de6994497edda79418400a1389bf8ce7 100644 --- a/indra/newview/alchatcommand.cpp +++ b/indra/newview/alchatcommand.cpp @@ -75,6 +75,7 @@ bool ALChatCommand::parseCommand(std::string data) static LLCachedControl<std::string> sRegionMsgCommand(gSavedSettings, "AlchemyChatCommandRegionMessage", "/regionmsg"); static LLCachedControl<std::string> sSetNearbyChatChannelCmd(gSavedSettings, "AlchemyChatCommandSetChatChannel", "/setchannel"); static LLCachedControl<std::string> sResyncAnimCommand(gSavedSettings, "AlchemyChatCommandResyncAnim", "/resync"); + static LLCachedControl<std::string> sTeleportToCam(gSavedSettings, "AlchemyChatCommandTeleportToCam", "/tp2cam"); if (cmd == utf8str_tolower(sDrawDistanceCommand)) // dd { @@ -251,6 +252,11 @@ bool ALChatCommand::parseCommand(std::string data) return true; } } + else if (cmd == utf8str_tolower(sTeleportToCam)) + { + gAgent.teleportViaLocation(gAgentCamera.getCameraPositionGlobal()); + return true; + } else if (cmd == utf8str_tolower(sResyncAnimCommand)) // Resync Animations { for (S32 i = 0; i < gObjectList.getNumObjects(); i++) diff --git a/indra/newview/app_settings/settings_alchemy.xml b/indra/newview/app_settings/settings_alchemy.xml index 2bcda27735db81a0049ff6d4cbf53a781f6dca8d..1cc0ce167aaf7b3423269e8ff0e947d753a18cd1 100644 --- a/indra/newview/app_settings/settings_alchemy.xml +++ b/indra/newview/app_settings/settings_alchemy.xml @@ -211,6 +211,17 @@ <key>Value</key> <string>/sethome</string> </map> + <key>AlchemyChatCommandTeleportToCam</key> + <map> + <key>Comment</key> + <string>Command to teleport to cam</string> + <key>Persist</key> + <integer>1</integer> + <key>Type</key> + <string>String</string> + <key>Value</key> + <string>/tp2cam</string> + </map> <key>AlchemyChatSeconds</key> <map> <key>Comment</key> diff --git a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml index 894a50233b794bab69591c79244239a480ecc585..f968a18dbc3cc3828f96afb17ee63190e15d863e 100755 --- a/indra/newview/skins/default/xui/en/panel_preferences_chat.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_chat.xml @@ -853,7 +853,7 @@ control_name="AlchemyChatCommandHome" enabled_control="AlchemyChatCommandEnable" width="220"/> - <!--sethome--> + <!--sethome--> <text top_pad="5" follows="left|top" @@ -872,6 +872,25 @@ control_name="AlchemyChatCommandSetHome" enabled_control="AlchemyChatCommandEnable" width="220"/> + <!--tp2cam--> + <text + top_pad="5" + follows="left|top" + height="18" + name="AlchemyChatCommandTeleportToCam_txt" + width="220"> + Teleport to Cam + </text> + <line_editor + top_pad="0" + follows="left|top" + height="20" + max_length_chars="256" + text_pad_left="5" + name="AlchemyChatCommandTeleportToCam" + control_name="AlchemyChatCommandTeleportToCam" + enabled_control="AlchemyChatCommandEnable" + width="220"/> <!--reserved--> <text top_pad="5"