diff options
author | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
commit | 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch) | |
tree | bcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/newview/llviewerjointattachment.cpp | |
parent | Second Life viewer sources 1.13.3.2 (diff) | |
download | meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2 meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz |
Second Life viewer sources 1.14.0.0
Diffstat (limited to 'linden/indra/newview/llviewerjointattachment.cpp')
-rw-r--r-- | linden/indra/newview/llviewerjointattachment.cpp | 39 |
1 files changed, 6 insertions, 33 deletions
diff --git a/linden/indra/newview/llviewerjointattachment.cpp b/linden/indra/newview/llviewerjointattachment.cpp index 89db44d..2a54a47 100644 --- a/linden/indra/newview/llviewerjointattachment.cpp +++ b/linden/indra/newview/llviewerjointattachment.cpp | |||
@@ -79,7 +79,7 @@ BOOL LLViewerJointAttachment::isTransparent() | |||
79 | //----------------------------------------------------------------------------- | 79 | //----------------------------------------------------------------------------- |
80 | // drawShape() | 80 | // drawShape() |
81 | //----------------------------------------------------------------------------- | 81 | //----------------------------------------------------------------------------- |
82 | U32 LLViewerJointAttachment::drawShape( F32 pixelArea ) | 82 | U32 LLViewerJointAttachment::drawShape( F32 pixelArea, BOOL first_pass ) |
83 | { | 83 | { |
84 | if (LLVOAvatar::sShowAttachmentPoints) | 84 | if (LLVOAvatar::sShowAttachmentPoints) |
85 | { | 85 | { |
@@ -296,47 +296,20 @@ void LLViewerJointAttachment::removeObject(LLViewerObject *object) | |||
296 | //----------------------------------------------------------------------------- | 296 | //----------------------------------------------------------------------------- |
297 | void LLViewerJointAttachment::setAttachmentVisibility(BOOL visible) | 297 | void LLViewerJointAttachment::setAttachmentVisibility(BOOL visible) |
298 | { | 298 | { |
299 | if (!mAttachedObject || mAttachedObject->mDrawable.isNull()) | 299 | if (!mAttachedObject || mAttachedObject->mDrawable.isNull() || |
300 | !(mAttachedObject->mDrawable->getSpatialBridge())) | ||
300 | return; | 301 | return; |
301 | 302 | ||
302 | if (visible) | 303 | if (visible) |
303 | { | 304 | { |
304 | // Hack to make attachments not visible by disabling their type mask! | 305 | // Hack to make attachments not visible by disabling their type mask! |
305 | // This will break if you can ever attach non-volumes! - djs 02/14/03 | 306 | // This will break if you can ever attach non-volumes! - djs 02/14/03 |
306 | mAttachedObject->mDrawable->setRenderType(LLPipeline::RENDER_TYPE_VOLUME); | 307 | mAttachedObject->mDrawable->getSpatialBridge()->mDrawableType = |
307 | for (LLViewerObject::child_list_t::iterator iter = mAttachedObject->mChildList.begin(); | 308 | mAttachedObject->isHUDAttachment() ? LLPipeline::RENDER_TYPE_HUD : LLPipeline::RENDER_TYPE_VOLUME; |
308 | iter != mAttachedObject->mChildList.end(); ++iter) | ||
309 | { | ||
310 | LLViewerObject* childp = *iter; | ||
311 | if (childp && childp->mDrawable.notNull()) | ||
312 | { | ||
313 | childp->mDrawable->setRenderType(LLPipeline::RENDER_TYPE_VOLUME); | ||
314 | } | ||
315 | } | ||
316 | } | 309 | } |
317 | else | 310 | else |
318 | { | 311 | { |
319 | //RN: sometimes we call this on objects that are already invisible, so check for that case | 312 | mAttachedObject->mDrawable->getSpatialBridge()->mDrawableType = 0; |
320 | if (!mAttachedObject->mDrawable->isRenderType(LLPipeline::RENDER_TYPE_VOLUME) && | ||
321 | !mAttachedObject->mDrawable->isRenderType(0)) | ||
322 | { | ||
323 | llerrs << "Tried to attach non-volume to a joint, visibility hack dangerous!" << llendl; | ||
324 | } | ||
325 | mAttachedObject->mDrawable->setRenderType(0); | ||
326 | for (LLViewerObject::child_list_t::iterator iter = mAttachedObject->mChildList.begin(); | ||
327 | iter != mAttachedObject->mChildList.end(); ++iter) | ||
328 | { | ||
329 | LLViewerObject* childp = *iter; | ||
330 | if (childp && childp->mDrawable.notNull()) | ||
331 | { | ||
332 | if (!childp->mDrawable->isRenderType(LLPipeline::RENDER_TYPE_VOLUME) && | ||
333 | !mAttachedObject->mDrawable->isRenderType(0)) | ||
334 | { | ||
335 | llerrs << "Tried to attach non-volume to a joint, visibility hack dangerous!" << llendl; | ||
336 | } | ||
337 | childp->mDrawable->setRenderType(0); | ||
338 | } | ||
339 | } | ||
340 | } | 313 | } |
341 | } | 314 | } |
342 | 315 | ||