diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-06-23 20:29:00 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-06-23 20:29:00 +0300 |
commit | 7717097f7cfa1deaa934b9846c22523f53c600d3 (patch) | |
tree | 1241345d89a4fcec3bb3e4a8a8205d298439aafa /indra/newview/llkeyconflict.cpp | |
parent | f08c8ef2082e193cf3822d76357b60f133130afc (diff) |
SL-6109 Teleport and autopilot should not work in some cases
Hides teleport_to and walk_to also optimizes couple things.
Diffstat (limited to 'indra/newview/llkeyconflict.cpp')
-rw-r--r-- | indra/newview/llkeyconflict.cpp | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/indra/newview/llkeyconflict.cpp b/indra/newview/llkeyconflict.cpp index 8ee50d5c52..b6107eeedf 100644 --- a/indra/newview/llkeyconflict.cpp +++ b/indra/newview/llkeyconflict.cpp @@ -243,6 +243,15 @@ LLKeyData LLKeyConflictHandler::getControl(const std::string &control_name, U32 return mControlsMap[control_name].getKeyData(index); } +bool LLKeyConflictHandler::isControlEmpty(const std::string &control_name) +{ + if (control_name.empty()) + { + return true; + } + return mControlsMap[control_name].mKeyBind.isEmpty(); +} + // static std::string LLKeyConflictHandler::getStringFromKeyData(const LLKeyData& keydata) { @@ -885,10 +894,27 @@ void LLKeyConflictHandler::generatePlaceholders(ESourceMode load_mode) registerTemporaryControl("edit_avatar_spin_under"); registerTemporaryControl("edit_avatar_move_forward"); registerTemporaryControl("edit_avatar_move_backward"); + + // no autopilot or teleport + registerTemporaryControl("walk_to"); + registerTemporaryControl("teleport_to"); + } + + if (load_mode == MODE_EDIT_AVATAR) + { + // no autopilot or teleport + registerTemporaryControl("walk_to"); + registerTemporaryControl("teleport_to"); } - if (load_mode != MODE_SITTING) + if (load_mode == MODE_SITTING) + { + // no autopilot + registerTemporaryControl("walk_to"); + } + else { + // sitting related functions should only be avaliable in sitting mode registerTemporaryControl("move_forward_sitting"); registerTemporaryControl("move_backward_sitting"); registerTemporaryControl("spin_over_sitting"); |