diff options
author | Oz Linden <oz@lindenlab.com> | 2011-08-04 09:12:08 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2011-08-04 09:12:08 -0400 |
commit | ca3cea390ca44e6e6c390b390e0ebdfafd2afa9e (patch) | |
tree | 005b934f87b6c5adc0a6f84ef6f12c67d606ce37 /indra/newview/llviewerobjectlist.cpp | |
parent | 1d9fe077a64d36272b32ae0fb1888d2b25aa1d43 (diff) | |
parent | 5451af6cca43f296e1b5654ab3e611928929c1c9 (diff) |
merge changes for storm-1537 : releasable mesh branch
Diffstat (limited to 'indra/newview/llviewerobjectlist.cpp')
-rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 48ccc7d035..db5684665b 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1071,10 +1071,12 @@ void LLViewerObjectList::fetchObjectCosts() LLSD id_list; U32 object_index = 0; + U32 count = 0; + for ( std::set<LLUUID>::iterator iter = mStaleObjectCost.begin(); iter != mStaleObjectCost.end(); - ++iter) + ) { // Check to see if a request for this object // has already been made. @@ -1084,13 +1086,15 @@ void LLViewerObjectList::fetchObjectCosts() mPendingObjectCost.insert(*iter); id_list[object_index++] = *iter; } - } - // id_list should now contain all - // requests in mStaleObjectCost before, so clear - // it now - mStaleObjectCost.clear(); + mStaleObjectCost.erase(iter++); + if (count++ >= 450) + { + break; + } + } + if ( id_list.size() > 0 ) { LLSD post_data = LLSD::emptyMap(); @@ -1410,6 +1414,10 @@ void LLViewerObjectList::updateActive(LLViewerObject *objectp) void LLViewerObjectList::updateObjectCost(LLViewerObject* object) { + if (!object->isRoot()) + { //always fetch cost for the parent when fetching cost for children + mStaleObjectCost.insert(((LLViewerObject*)object->getParent())->getID()); + } mStaleObjectCost.insert(object->getID()); } |