summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2015-02-24 15:48:28 -0500
committerOz Linden <oz@lindenlab.com>2015-02-24 15:48:28 -0500
commit905431cf60c5670b6b069f0881778ada6ceaa035 (patch)
tree59cc1d383cc9025a499cae686bc5786992d7febe /indra/newview/llviewerregion.cpp
parenta91482f0afa38c39a027f5b54bca652147917f2a (diff)
parent9b45bc992edf8d049d8a1abe2e778870a493295a (diff)
merge changes for 3.7.25-release
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-xindra/newview/llviewerregion.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index c0c9855903..c46b6789f6 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -66,6 +66,7 @@
#include "llviewerstatsrecorder.h"
#include "llvlmanager.h"
#include "llvlcomposition.h"
+#include "llvoavatarself.h"
#include "llvocache.h"
#include "llworld.h"
#include "llspatialpartition.h"
@@ -1483,16 +1484,27 @@ void LLViewerRegion::killObject(LLVOCacheEntry* entry, std::vector<LLDrawable*>&
if(drawablep && !drawablep->getParent())
{
- LLViewerObject::const_child_list_t& child_list = drawablep->getVObj()->getChildren();
+ LLViewerObject* v_obj = drawablep->getVObj();
+ if (v_obj->isSelected()
+ || (v_obj->flagAnimSource() && isAgentAvatarValid() && gAgentAvatarp->hasMotionFromSource(v_obj->getID())))
+ {
+ // do not remove objects user is interacting with
+ ((LLViewerOctreeEntryData*)drawablep)->setVisible();
+ return;
+ }
+ LLViewerObject::const_child_list_t& child_list = v_obj->getChildren();
for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
iter != child_list.end(); iter++)
{
LLViewerObject* child = *iter;
if(child->mDrawable)
{
- if(!child->mDrawable->getEntry() || !child->mDrawable->getEntry()->hasVOCacheEntry())
+ if( !child->mDrawable->getEntry()
+ || !child->mDrawable->getEntry()->hasVOCacheEntry()
+ || child->isSelected()
+ || (child->flagAnimSource() && isAgentAvatarValid() && gAgentAvatarp->hasMotionFromSource(child->getID())))
{
- //do not remove parent if any of its children non-cacheable
+ //do not remove parent if any of its children non-cacheable, animating or selected
//especially for the case that an avatar sits on a cache-able object
((LLViewerOctreeEntryData*)drawablep)->setVisible();
return;