diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-04-18 11:54:12 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2017-04-18 11:54:12 +0300 |
commit | 0a48d57884aeb6631d0b1c7574c02fb5f3141e39 (patch) | |
tree | 82bb599b78f985fa30d115aadc377d9dd47b94f9 | |
parent | 5ddac01ef274285ed39ab2248382531b710fdb75 (diff) |
MAINT-1086 FIXED Cannot select a fully transparent object with Beacon Highlight
-rw-r--r-- | indra/newview/llviewerobject.cpp | 18 | ||||
-rw-r--r-- | indra/newview/llviewerobject.h | 4 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 2 |
3 files changed, 22 insertions, 2 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 45dbd95bea..1d6daed9cc 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -6274,6 +6274,24 @@ BOOL LLViewerObject::isTempAttachment() const return (mID.notNull() && (mID == mAttachmentItemID)); } +BOOL LLViewerObject::isHiglightedOrBeacon() const +{ + if (LLFloaterReg::instanceVisible("beacons") && (gPipeline.getRenderBeacons(NULL) || gPipeline.getRenderHighlights(NULL))) + { + BOOL has_media = (getMediaType() == LLViewerObject::MEDIA_SET); + BOOL is_scripted = !isAvatar() && !getParent() && flagScripted(); + BOOL is_physical = !isAvatar() && flagUsePhysics(); + + return (isParticleSource() && gPipeline.getRenderParticleBeacons(NULL)) + || (isAudioSource() && gPipeline.getRenderSoundBeacons(NULL)) + || (has_media && gPipeline.getRenderMOAPBeacons(NULL)) + || (is_scripted && gPipeline.getRenderScriptedBeacons(NULL)) + || (is_scripted && flagHandleTouch() && gPipeline.getRenderScriptedTouchBeacons(NULL)) + || (is_physical && gPipeline.getRenderPhysicalBeacons(NULL)); + } + return FALSE; +} + const LLUUID &LLViewerObject::getAttachmentItemID() const { diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h index 1e8f3f4ec2..24fcf0517e 100644 --- a/indra/newview/llviewerobject.h +++ b/indra/newview/llviewerobject.h @@ -178,6 +178,8 @@ public: virtual BOOL isHUDAttachment() const { return FALSE; } virtual BOOL isTempAttachment() const; + virtual BOOL isHiglightedOrBeacon() const; + virtual void updateRadius() {}; virtual F32 getVObjRadius() const; // default implemenation is mDrawable->getRadius() @@ -388,7 +390,7 @@ public: // Create if necessary LLAudioSource *getAudioSource(const LLUUID& owner_id); - bool isAudioSource() {return mAudioSourcep != NULL;} + BOOL isAudioSource() const {return mAudioSourcep != NULL;} U8 getMediaType() const; void setMediaType(U8 media_type); diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 657babd92c..90ba814a15 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -3977,7 +3977,7 @@ BOOL LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a& start_face = face; end_face = face+1; } - + pick_transparent |= isHiglightedOrBeacon(); bool special_cursor = specialHoverCursor(); for (S32 i = start_face; i < end_face; ++i) { |