summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerregion.cpp
diff options
context:
space:
mode:
authorRoxanne Skelly <roxanne@roxiware.com>2024-05-08 17:41:46 -0700
committerGitHub <noreply@github.com>2024-05-08 17:41:46 -0700
commitbe19e495c5483c06b9b90dd18bf8ebbe7ceaa336 (patch)
tree4d51dd366e2e2ce69610a06e7ab767824ab8869c /indra/newview/llviewerregion.cpp
parent818c8c6deaa755c02b64fb03766ee03d66021968 (diff)
parent70af754dc09e29a492828e7cc4ed5db8d32eda3d (diff)
Merge pull request #1440 from secondlife/roxie/webrtc-voice
Diffstat (limited to 'indra/newview/llviewerregion.cpp')
-rwxr-xr-xindra/newview/llviewerregion.cpp33
1 files changed, 16 insertions, 17 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 39aaac57c1..e7489fbc5f 100755
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -829,10 +829,17 @@ void LLViewerRegion::saveObjectCache()
mCacheDirty = FALSE;
}
- // Map of LLVOCacheEntry takes time to release, store map for cleanup on idle
- sRegionCacheCleanup.insert(mImpl->mCacheMap.begin(), mImpl->mCacheMap.end());
- mImpl->mCacheMap.clear();
- // TODO - probably need to do the same for overrides cache
+ if (LLAppViewer::instance()->isQuitting())
+ {
+ mImpl->mCacheMap.clear();
+ }
+ else
+ {
+ // Map of LLVOCacheEntry takes time to release, store map for cleanup on idle
+ sRegionCacheCleanup.insert(mImpl->mCacheMap.begin(), mImpl->mCacheMap.end());
+ mImpl->mCacheMap.clear();
+ // TODO - probably need to do the same for overrides cache
+ }
}
void LLViewerRegion::sendMessage()
@@ -1879,8 +1886,6 @@ LLViewerObject* LLViewerRegion::addNewObject(LLVOCacheEntry* entry)
addActiveCacheEntry(entry);
}
- loadCacheMiscExtras(entry->getLocalID());
-
return obj;
}
@@ -2467,7 +2472,10 @@ void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)
//set parent id
U32 parent_id = 0;
- LLViewerObject::unpackParentID(entry->getDP(), parent_id);
+ if (entry->getDP()) // NULL if nothing cached
+ {
+ LLViewerObject::unpackParentID(entry->getDP(), parent_id);
+ }
if(parent_id != entry->getParentID())
{
entry->setParentID(parent_id);
@@ -2487,7 +2495,7 @@ void LLViewerRegion::decodeBoundingInfo(LLVOCacheEntry* entry)
LLQuaternion rot;
//decode spatial info and parent info
- U32 parent_id = LLViewerObject::extractSpatialExtents(entry->getDP(), pos, scale, rot);
+ U32 parent_id = entry->getDP() ? LLViewerObject::extractSpatialExtents(entry->getDP(), pos, scale, rot) : entry->getParentID();
U32 old_parent_id = entry->getParentID();
bool same_old_parent = false;
@@ -3656,15 +3664,6 @@ std::string LLViewerRegion::getSimHostName()
return std::string("...");
}
-void LLViewerRegion::loadCacheMiscExtras(U32 local_id)
-{
- auto iter = mImpl->mGLTFOverridesLLSD.find(local_id);
- if (iter != mImpl->mGLTFOverridesLLSD.end())
- {
- LLGLTFMaterialList::loadCacheOverrides(iter->second);
- }
-}
-
void LLViewerRegion::applyCacheMiscExtras(LLViewerObject* obj)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;