summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
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/llviewerregion.cpp
parente46c4fd1c6f8d99e87fd53e71d97fb8ce925a576 (diff)
fix for various object missing bugs: SH-4552, SH-4564, SH-4573, SH-4568
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-xindra/newview/llviewerregion.cpp10
1 files changed, 7 insertions, 3 deletions
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);
}
}