aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llviewerobject.cpp80
1 files changed, 47 insertions, 33 deletions
diff --git a/linden/indra/newview/llviewerobject.cpp b/linden/indra/newview/llviewerobject.cpp
index ec81146..0c9ca01 100644
--- a/linden/indra/newview/llviewerobject.cpp
+++ b/linden/indra/newview/llviewerobject.cpp
@@ -2,6 +2,8 @@
2 * @file llviewerobject.cpp 2 * @file llviewerobject.cpp
3 * @brief Base class for viewer objects 3 * @brief Base class for viewer objects
4 * 4 *
5 * $LicenseInfo:firstyear=2001&license=viewergpl$
6 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 7 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 8 *
7 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
@@ -24,6 +26,7 @@
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE. 28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
27 */ 30 */
28 31
29#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
@@ -645,6 +648,29 @@ BOOL LLViewerObject::setDrawableParent(LLDrawable* parentp)
645 return ret; 648 return ret;
646} 649}
647 650
651// Show or hide particles, icon and HUD
652void LLViewerObject::hideExtraDisplayItems( BOOL hidden )
653{
654 if( mPartSourcep.notNull() )
655 {
656 LLViewerPartSourceScript *partSourceScript = mPartSourcep.get();
657 partSourceScript->setSuspended( hidden );
658 }
659
660 if( mText.notNull() )
661 {
662 LLHUDText *hudText = mText.get();
663 hudText->setHidden( hidden );
664 }
665
666 if( mIcon.notNull() )
667 {
668 LLHUDIcon *hudIcon = mIcon.get();
669 hudIcon->setHidden( hidden );
670 }
671}
672
673
648U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys, 674U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
649 void **user_data, 675 void **user_data,
650 U32 block_num, 676 U32 block_num,
@@ -1596,23 +1622,8 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
1596 sent_parentp->addChild(this); 1622 sent_parentp->addChild(this);
1597 } 1623 }
1598 1624
1599 if( mPartSourcep.notNull() ) 1625 // Show particles, icon and HUD
1600 { 1626 hideExtraDisplayItems( FALSE );
1601 LLViewerPartSourceScript *partSourceScript = mPartSourcep.get();
1602 partSourceScript->setSuspended( FALSE );
1603 }
1604
1605 if( mText.notNull() )
1606 {
1607 LLHUDText *hudText = mText.get();
1608 hudText->setHidden( FALSE );
1609 }
1610
1611 if( mIcon.notNull() )
1612 {
1613 LLHUDIcon *hudIcon = mIcon.get();
1614 hudIcon->setHidden( FALSE );
1615 }
1616 1627
1617 setChanged(MOVED | SILHOUETTE); 1628 setChanged(MOVED | SILHOUETTE);
1618 } 1629 }
@@ -1628,23 +1639,9 @@ U32 LLViewerObject::processUpdateMessage(LLMessageSystem *mesgsys,
1628 U32 port = mesgsys->getSenderPort(); 1639 U32 port = mesgsys->getSenderPort();
1629 1640
1630 gObjectList.orphanize(this, parent_id, ip, port); 1641 gObjectList.orphanize(this, parent_id, ip, port);
1631 if( mPartSourcep.notNull() )
1632 {
1633 LLViewerPartSourceScript *partSourceScript = mPartSourcep.get();
1634 partSourceScript->setSuspended( TRUE );
1635 }
1636
1637 if( mText.notNull() )
1638 {
1639 LLHUDText *hudText = mText.get();
1640 hudText->setHidden( TRUE );
1641 }
1642 1642
1643 if( mIcon.notNull() ) 1643 // Hide particles, icon and HUD
1644 { 1644 hideExtraDisplayItems( TRUE );
1645 LLHUDIcon *hudIcon = mIcon.get();
1646 hudIcon->setHidden( TRUE );
1647 }
1648 } 1645 }
1649 } 1646 }
1650 } 1647 }
@@ -4691,6 +4688,23 @@ void LLViewerObject::markForUpdate(BOOL priority)
4691 } 4688 }
4692} 4689}
4693 4690
4691bool LLViewerObject::getIncludeInSearch() const
4692{
4693 return ((mFlags & FLAGS_INCLUDE_IN_SEARCH) != 0);
4694}
4695
4696void LLViewerObject::setIncludeInSearch(bool include_in_search)
4697{
4698 if (include_in_search)
4699 {
4700 mFlags |= FLAGS_INCLUDE_IN_SEARCH;
4701 }
4702 else
4703 {
4704 mFlags &= ~FLAGS_INCLUDE_IN_SEARCH;
4705 }
4706}
4707
4694void LLViewerObject::setRegion(LLViewerRegion *regionp) 4708void LLViewerObject::setRegion(LLViewerRegion *regionp)
4695{ 4709{
4696 llassert(regionp); 4710 llassert(regionp);