summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatarself.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatarself.cpp')
-rw-r--r--indra/newview/llvoavatarself.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 914376f5d1..b03d32d291 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -960,7 +960,7 @@ void LLVOAvatarSelf::updateRegion(LLViewerRegion *regionp)
}
//--------------------------------------------------------------------
-// draw tractor beam when editing objects
+// draw tractor (selection) beam when editing objects
//--------------------------------------------------------------------
//virtual
void LLVOAvatarSelf::idleUpdateTractorBeam()
@@ -2821,12 +2821,14 @@ BOOL LLVOAvatarSelf::needsRenderBeam()
LLTool *tool = LLToolMgr::getInstance()->getCurrentTool();
BOOL is_touching_or_grabbing = (tool == LLToolGrab::getInstance() && LLToolGrab::getInstance()->isEditing());
- if (LLToolGrab::getInstance()->getEditingObject() &&
- LLToolGrab::getInstance()->getEditingObject()->isAttachment())
- {
- // don't render selection beam on hud objects
- is_touching_or_grabbing = FALSE;
- }
+ LLViewerObject* objp = LLToolGrab::getInstance()->getEditingObject();
+ if (objp // might need to be "!objp ||" instead of "objp &&".
+ && (objp->isAttachment() || objp->isAvatar()))
+ {
+ // don't render grab tool's selection beam on hud objects,
+ // attachments or avatars
+ is_touching_or_grabbing = FALSE;
+ }
return is_touching_or_grabbing || (getAttachmentState() & AGENT_STATE_EDITING && LLSelectMgr::getInstance()->shouldShowSelection());
}