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.cpp54
1 files changed, 23 insertions, 31 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 26fdf51485..ae48db24bc 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -98,7 +98,7 @@ LLDrawable::LLDrawable(LLViewerObject *vobj, bool new_entry)
void LLDrawable::init(bool new_entry)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
// mXform
mParent = NULL;
@@ -305,7 +305,7 @@ S32 LLDrawable::findReferences(LLDrawable *drawablep)
LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
LLFace *face;
{
@@ -333,7 +333,7 @@ LLFace* LLDrawable::addFace(LLFacePool *poolp, LLViewerTexture *texturep)
LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
LLFace *face;
@@ -356,7 +356,7 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep)
LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep, LLViewerTexture *normalp)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
LLFace *face;
face = new LLFace(this, mVObjp);
@@ -379,7 +379,7 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep,
LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep, LLViewerTexture *normalp, LLViewerTexture *specularp)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
LLFace *face;
face = new LLFace(this, mVObjp);
@@ -403,7 +403,7 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep,
void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerTexture *texturep)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
if (newFaces == (S32)mFaces.size())
{
@@ -428,7 +428,7 @@ void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerText
void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewerTexture *texturep)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
if (newFaces <= (S32)mFaces.size() && newFaces >= (S32)mFaces.size()/2)
{
@@ -453,7 +453,7 @@ void LLDrawable::setNumFacesFast(const S32 newFaces, LLFacePool *poolp, LLViewer
void LLDrawable::mergeFaces(LLDrawable* src)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
auto face_count = mFaces.size() + src->mFaces.size();
@@ -488,7 +488,7 @@ void LLDrawable::updateMaterial()
void LLDrawable::makeActive()
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
#if !LL_RELEASE_FOR_DOWNLOAD
if (mVObjp.notNull())
@@ -552,7 +552,7 @@ void LLDrawable::makeActive()
void LLDrawable::makeStatic(bool warning_enabled)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
if (isState(ACTIVE) &&
!isState(ACTIVE_CHILD) &&
@@ -600,7 +600,7 @@ void LLDrawable::makeStatic(bool warning_enabled)
// Returns "distance" between target destination and resulting xfrom
F32 LLDrawable::updateXform(bool undamped)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
bool damped = !undamped;
@@ -754,7 +754,7 @@ void LLDrawable::moveUpdatePipeline(bool moved)
void LLDrawable::movePartition()
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
LLSpatialPartition* part = getSpatialPartition();
if (part)
@@ -800,7 +800,7 @@ bool LLDrawable::updateMoveUndamped()
void LLDrawable::updatePartition()
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
if (!getVOVolume())
{
@@ -819,7 +819,7 @@ void LLDrawable::updatePartition()
bool LLDrawable::updateMoveDamped()
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
F32 dist_squared = updateXform(false);
@@ -844,7 +844,7 @@ bool LLDrawable::updateMoveDamped()
void LLDrawable::updateDistance(LLCamera& camera, bool force_update)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
if (LLViewerCamera::sCurCameraID != LLViewerCamera::CAMERA_WORLD)
{
@@ -944,7 +944,7 @@ void LLDrawable::updateTexture()
bool LLDrawable::updateGeometry()
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
llassert(mVObjp.notNull());
bool res = mVObjp && mVObjp->updateGeometry(this);
@@ -1022,7 +1022,7 @@ const LLVector3& LLDrawable::getBounds(LLVector3& min, LLVector3& max) const
void LLDrawable::updateSpatialExtents()
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
if (mVObjp)
{
@@ -1158,7 +1158,7 @@ void LLDrawable::setGroup(LLViewerOctreeGroup *groupp)
*/
LLSpatialPartition* LLDrawable::getSpatialPartition()
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
LLSpatialPartition* retval = NULL;
@@ -1295,7 +1295,7 @@ void LLSpatialBridge::destroyTree()
void LLSpatialBridge::updateSpatialExtents()
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
LLSpatialGroup* root = (LLSpatialGroup*) mOctree->getListener(0);
@@ -1468,7 +1468,7 @@ public:
void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>* results, bool for_select)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
if (!gPipeline.hasRenderType(mDrawableType))
{
@@ -1567,7 +1567,7 @@ void LLSpatialBridge::setVisible(LLCamera& camera_in, std::vector<LLDrawable*>*
void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE
+ LL_PROFILE_ZONE_SCOPED_CATEGORY_DRAWABLE;
if (mDrawable == NULL)
{
@@ -1600,18 +1600,10 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
mDrawable->updateDistance(camera, force_update);
- LLViewerObject::const_child_list_t& child_list = mDrawable->getVObj()->getChildren();
- for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
- iter != child_list.end(); iter++)
+ for (LLViewerObject* child : mDrawable->getVObj()->getChildren())
{
- LLViewerObject* child = *iter;
LLDrawable* drawable = child->mDrawable;
- if (!drawable)
- {
- continue;
- }
-
- if (!drawable->isAvatar())
+ if (drawable && !drawable->isDead() && !drawable->isAvatar())
{
drawable->updateDistance(camera, force_update);
}