summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-01-06 21:54:10 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-01-06 21:55:25 +0200
commitbc78cf0b5111c3f6588877e56239030f6e92b55a (patch)
tree2376724e65e1d1d72be69be4b1843de3b3e4ad24 /indra/newview
parent747dbb7da2482ce00b15b268344ad1306ea850cf (diff)
SL-16604 Double click teleport should ignore clicking yourself
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/lltoolpie.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/lltoolpie.cpp b/indra/newview/lltoolpie.cpp
index 15d5473c41..4f7511294d 100644
--- a/indra/newview/lltoolpie.cpp
+++ b/indra/newview/lltoolpie.cpp
@@ -654,6 +654,12 @@ bool LLToolPie::teleportToClickedLocation()
LLViewerObject* objp = mHoverPick.getObject();
LLViewerObject* parentp = objp ? objp->getRootEdit() : NULL;
+ if (objp->getAvatar() == gAgentAvatarp)
+ {
+ // Don't teleport to self, teleporting to other avatars is fine
+ return false;
+ }
+
bool is_in_world = mHoverPick.mObjectID.notNull() && objp && !objp->isHUDAttachment();
bool is_land = mHoverPick.mPickType == LLPickInfo::PICK_LAND;
bool pos_non_zero = !mHoverPick.mPosGlobal.isExactlyZero();