diff options
author | Oz Linden <oz@lindenlab.com> | 2015-03-23 22:39:18 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2015-03-23 22:39:18 -0400 |
commit | d6f7a16a686a32a3369661b8db35860e7cae6e8f (patch) | |
tree | 07b0117b098fef20dd9ddc597e4c0599c4235a4d /indra/newview/llviewerregion.cpp | |
parent | 7ba82a6409e4fc096407f0247b084950d1e3c14a (diff) | |
parent | c489f1f8647a77c8c7d5fb5b721433dd72cb49c8 (diff) |
merge changes for 3.7.26-release
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-x | indra/newview/llviewerregion.cpp | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp index 11cbf3fc24..7ebe12cc07 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" @@ -424,6 +425,7 @@ LLViewerRegion::LLViewerRegion(const U64 &handle, mCacheDirty(FALSE), mReleaseNotesRequested(FALSE), mCapabilitiesReceived(false), + mSimulatorFeaturesReceived(false), mBitsReceived(0.f), mPacketsReceived(0.f), mDead(FALSE), @@ -1485,16 +1487,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; @@ -2027,6 +2040,26 @@ void LLViewerRegion::getInfo(LLSD& info) info["Region"]["Handle"]["y"] = (LLSD::Integer)y; } +boost::signals2::connection LLViewerRegion::setSimulatorFeaturesReceivedCallback(const caps_received_signal_t::slot_type& cb) +{ + return mSimulatorFeaturesReceivedSignal.connect(cb); +} + +void LLViewerRegion::setSimulatorFeaturesReceived(bool received) +{ + mSimulatorFeaturesReceived = received; + if (received) + { + mSimulatorFeaturesReceivedSignal(getRegionID()); + mSimulatorFeaturesReceivedSignal.disconnect_all_slots(); + } +} + +bool LLViewerRegion::simulatorFeaturesReceived() const +{ + return mSimulatorFeaturesReceived; +} + void LLViewerRegion::getSimulatorFeatures(LLSD& sim_features) const { sim_features = mSimulatorFeatures; @@ -2040,6 +2073,9 @@ void LLViewerRegion::setSimulatorFeatures(const LLSD& sim_features) LLSDSerialize::toPrettyXML(sim_features, str); LL_INFOS() << str.str() << LL_ENDL; mSimulatorFeatures = sim_features; + + setSimulatorFeaturesReceived(true); + } //this is called when the parent is not cacheable. @@ -3088,6 +3124,12 @@ bool LLViewerRegion::dynamicPathfindingEnabled() const return ( mSimulatorFeatures.has("DynamicPathfindingEnabled") && mSimulatorFeatures["DynamicPathfindingEnabled"].asBoolean()); } + +bool LLViewerRegion::avatarHoverHeightEnabled() const +{ + return ( mSimulatorFeatures.has("AvatarHoverHeightEnabled") && + mSimulatorFeatures["AvatarHoverHeightEnabled"].asBoolean()); +} /* Static Functions */ void log_capabilities(const CapabilityMap &capmap) |