From a7cba5f1a378a3ec1e270e41dac486e4309eb8cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Sun, 5 Jan 2020 23:27:51 -0500 Subject: [PATCH] Add Alchemy's /sethome command --- indra/newview/app_settings/settings_ascent.xml | 11 +++++++++++ indra/newview/chatbar_as_cmdline.cpp | 6 ++++++ 2 files changed, 17 insertions(+) diff --git a/indra/newview/app_settings/settings_ascent.xml b/indra/newview/app_settings/settings_ascent.xml index 13f340a5a..4c94a855f 100644 --- a/indra/newview/app_settings/settings_ascent.xml +++ b/indra/newview/app_settings/settings_ascent.xml @@ -157,6 +157,17 @@ Value /setchannel + AlchemyChatCommandSetHome + + Comment + Command to set the avatar home + Persist + 1 + Type + String + Value + /sethome + AlchemyConnectToNeighbors Comment diff --git a/indra/newview/chatbar_as_cmdline.cpp b/indra/newview/chatbar_as_cmdline.cpp index b68240e60..ed1eeca85 100644 --- a/indra/newview/chatbar_as_cmdline.cpp +++ b/indra/newview/chatbar_as_cmdline.cpp @@ -255,6 +255,7 @@ bool cmd_line_chat(std::string data, EChatType type) static LLCachedControl sPosCommand(gSavedSettings, "AscentCmdLinePos"); static LLCachedControl sRezPlatCommand(gSavedSettings, "AscentCmdLineRezPlatform"); static LLCachedControl sHomeCommand(gSavedSettings, "AscentCmdLineTeleportHome"); + static LLCachedControl sSetHomeCommand(gSavedSettings, "AlchemyChatCommandSetHome", "/sethome"); static LLCachedControl sCalcCommand(gSavedSettings, "AscentCmdLineCalc"); static LLCachedControl sMapToCommand(gSavedSettings, "AscentCmdLineMapTo"); static LLCachedControl sClearCommand(gSavedSettings, "AscentCmdLineClearChat"); @@ -365,6 +366,11 @@ bool cmd_line_chat(std::string data, EChatType type) gAgent.teleportHome(); return false; } + else if (cmd == utf8str_tolower(sSetHomeCommand)) // sethome + { + gAgent.setStartPosition(START_LOCATION_ID_HOME); + return false; + } else if (cmd == utf8str_tolower(sCalcCommand))//Cryogenic Blitz { if (data.length() > cmd.length() + 1)