summaryrefslogtreecommitdiff
path: root/indra/newview/llkeyconflict.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llkeyconflict.cpp')
-rw-r--r--indra/newview/llkeyconflict.cpp28
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");