summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-01-24 17:11:33 -0700
committerXiaohong Bao <bao@lindenlab.com>2013-01-24 17:11:33 -0700
commit3660f8b632d1288cefeeff66c3b62522b4bbacbc (patch)
treedcf3393c99b725666510ce54ecad90e1ed63a905
parent173806c4b1d18fe0188c1d189e7044fa977268ae (diff)
more for SH-3653: Can we repurpose ObjectUpdateCached:ObjectData:UpdateFlags field to carry spatial+size data?
-rw-r--r--indra/newview/llviewerregion.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/newview/llviewerregion.cpp b/indra/newview/llviewerregion.cpp
index 45d43bdf74..e5cb2a1b08 100644
--- a/indra/newview/llviewerregion.cpp
+++ b/indra/newview/llviewerregion.cpp
@@ -1724,13 +1724,13 @@ LLVOCacheEntry* LLViewerRegion::getCacheEntry(U32 local_id)
//estimate weight of cache missed object
F32 LLViewerRegion::calcObjectWeight(U32 flags)
{
- LLVector3 pos((F32)(flags & 0xff), (F32)((flags >> 8) & 0xff), (F32)((flags >> 16) & 0xff) * 16.f);
+ LLVector3 pos((F32)(flags & 0xff) + 0.5f, (F32)((flags >> 8) & 0xff) + 0.5f, (F32)((flags >> 16) & 0xff) * 16.f + 8.0f);
F32 rad = (F32)((flags >> 24) & 0xff);
pos += getOriginAgent();
pos -= LLViewerCamera::getInstance()->getOrigin();
- return rad * rad / pos.lengthSquared();
+ return 100.f * rad * rad / pos.lengthSquared();
}
void LLViewerRegion::addCacheMiss(U32 id, LLViewerRegion::eCacheMissType miss_type, F32 weight)