summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-10-22 16:07:41 -0600
committerXiaohong Bao <bao@lindenlab.com>2013-10-22 16:07:41 -0600
commite0ace6d8690b2f60fb9b359f4840081957a3ff25 (patch)
tree0fe54cf46602e4afc6487c03e874b891b8ceb4f7 /indra/newview
parente46c4fd1c6f8d99e87fd53e71d97fb8ce925a576 (diff)
fix for various object missing bugs: SH-4552, SH-4564, SH-4573, SH-4568
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llvieweroctree.cpp7
-rw-r--r--indra/newview/llvieweroctree.h1
-rwxr-xr-xindra/newview/llviewerregion.cpp10
-rwxr-xr-xindra/newview/llvocache.cpp2
4 files changed, 17 insertions, 3 deletions
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index 993967ee94..ef802f2651 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -425,6 +425,13 @@ void LLViewerOctreeEntryData::setVisible() const
}
}
+void LLViewerOctreeEntryData::resetVisible() const
+{
+ if(mEntry)
+ {
+ mEntry->mVisible = 0;
+ }
+}
//-----------------------------------------------------------------------------------
//class LLViewerOctreeGroup definitions
//-----------------------------------------------------------------------------------
diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h
index 6ea6130413..611f285c8e 100644
--- a/indra/newview/llvieweroctree.h
+++ b/indra/newview/llvieweroctree.h
@@ -156,6 +156,7 @@ public:
U32 getVisible() const {return mEntry ? mEntry->mVisible : 0;}
void setVisible() const;
+ void resetVisible() const;
virtual bool isVisible() const;
virtual bool isRecentlyVisible() const;
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index e73b4fb62c..d619a2af8b 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1061,15 +1061,19 @@ F32 LLViewerRegion::updateVisibleEntries(F32 max_time)
LLTimer update_timer;
+ const F32 LARGE_SCENE_CONTRIBUTION = 100.f; //a large number to force to load the object.
const LLVector3 camera_origin = LLViewerCamera::getInstance()->getOrigin();
const U32 cur_frame = LLViewerOctreeEntryData::getCurrentFrame();
bool needs_update = ((cur_frame - mImpl->mLastCameraUpdate) > 5) && ((camera_origin - mImpl->mLastCameraOrigin).lengthSquared() > 10.f);
+ U32 last_update = mImpl->mLastCameraUpdate;
//process visible entries
for(LLVOCacheEntry::vocache_entry_set_t::iterator iter = mImpl->mVisibleEntries.begin(); iter != mImpl->mVisibleEntries.end();)
{
LLVOCacheEntry* vo_entry = *iter;
- vo_entry->calcSceneContribution(camera_origin, needs_update, mImpl->mLastCameraUpdate);
+
+ //set a large number to force to load this object.
+ vo_entry->setSceneContribution(LARGE_SCENE_CONTRIBUTION);
if(vo_entry->getState() < LLVOCacheEntry::WAITING)
{
@@ -1084,7 +1088,7 @@ F32 LLViewerRegion::updateVisibleEntries(F32 max_time)
child = vo_entry->getChild(i);
if(child->getState() < LLVOCacheEntry::WAITING)
{
- child->setSceneContribution(vo_entry->getSceneContribution());
+ child->setSceneContribution(LARGE_SCENE_CONTRIBUTION); //a large number to force to load the child.
mImpl->mWaitingList.insert(child);
}
else
@@ -1140,7 +1144,7 @@ F32 LLViewerRegion::updateVisibleEntries(F32 max_time)
continue;
}
- vo_entry->calcSceneContribution(camera_origin, needs_update, mImpl->mLastCameraUpdate);
+ vo_entry->calcSceneContribution(camera_origin, needs_update, last_update);
mImpl->mWaitingList.insert(vo_entry);
}
}
diff --git a/indra/newview/llvocache.cpp b/indra/newview/llvocache.cpp
index 3f2a39ba2b..72270eec46 100755
--- a/indra/newview/llvocache.cpp
+++ b/indra/newview/llvocache.cpp
@@ -250,6 +250,7 @@ void LLVOCacheEntry::addChild(LLVOCacheEntry* entry)
if(getEntry() != NULL && isState(INACTIVE))
{
updateParentBoundingInfo(entry);
+ resetVisible();
}
}
@@ -441,6 +442,7 @@ void LLVOCacheEntry::updateParentBoundingInfo()
{
updateParentBoundingInfo(mChildrenList[i]);
}
+ resetVisible();
}
//make the parent bounding box to include this child