summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawable.cpp')
-rw-r--r--indra/newview/lldrawable.cpp20
1 files changed, 14 insertions, 6 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 069155c255..9fbc3408d7 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -89,7 +89,7 @@ LLDynamicArrayPtr<LLPointer<LLDrawable> > LLDrawable::sDeadList;
void LLDrawable::incrementVisible()
{
sCurVisible++;
- sCurPixelAngle = (F32) gViewerWindow->getWindowDisplayHeight()/LLViewerCamera::getInstance()->getView();
+ sCurPixelAngle = (F32) gViewerWindow->getWindowHeightRaw()/LLViewerCamera::getInstance()->getView();
}
void LLDrawable::init()
{
@@ -105,7 +105,7 @@ void LLDrawable::init()
mVObjp = NULL;
// mFaces
mSpatialGroupp = NULL;
- mVisible = 0;
+ mVisible = sCurVisible - 2;//invisible for the current frame and the last frame.
mRadius = 0.f;
mGeneration = -1;
@@ -1049,9 +1049,13 @@ LLSpatialBridge::LLSpatialBridge(LLDrawable* root, BOOL render_by_group, U32 dat
llassert(mDrawable);
llassert(mDrawable->getRegion());
- llassert(mDrawable->getRegion()->getSpatialPartition(mPartitionType));
+ LLSpatialPartition *part = mDrawable->getRegion()->getSpatialPartition(mPartitionType);
+ llassert(part);
- mDrawable->getRegion()->getSpatialPartition(mPartitionType)->put(this);
+ if (part)
+ {
+ part->put(this);
+ }
}
LLSpatialBridge::~LLSpatialBridge()
@@ -1367,10 +1371,14 @@ BOOL LLSpatialBridge::updateMove()
{
llassert(mDrawable);
llassert(mDrawable->getRegion());
- llassert(mDrawable->getRegion()->getSpatialPartition(mPartitionType));
+ LLSpatialPartition* part = mDrawable->getRegion()->getSpatialPartition(mPartitionType);
+ llassert(part);
mOctree->balance();
- mDrawable->getRegion()->getSpatialPartition(mPartitionType)->move(this, getSpatialGroup(), TRUE);
+ if (part)
+ {
+ part->move(this, getSpatialGroup(), TRUE);
+ }
return TRUE;
}