summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvoavatar.cpp20
-rw-r--r--indra/newview/llvoavatar.h4
-rw-r--r--indra/newview/llvovolume.cpp12
3 files changed, 28 insertions, 8 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 13ae43c7d6..56a895bd1f 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -127,6 +127,9 @@ const F32 MIN_HOVER_Z = -2.0;
const F32 MIN_ATTACHMENT_COMPLEXITY = 0.f;
const F32 DEFAULT_MAX_ATTACHMENT_COMPLEXITY = 1.0e6f;
+// Unlike with 'self' avatar, server doesn't inform viewer about
+// expected attachments so viewer has to wait to see if anything
+// else will arrive
const F32 FIRST_APPEARANCE_CLOUD_MIN_DELAY = 3.f; // seconds
const F32 FIRST_APPEARANCE_CLOUD_MAX_DELAY = 45.f;
@@ -746,7 +749,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mCurrentGesticulationLevel = 0;
- mFirstSeenTimer.reset();
+ mFirstAppearanceMessageTimer.reset();
mRuthTimer.reset();
mRuthDebugTimer.reset();
mDebugExistenceTimer.reset();
@@ -6434,6 +6437,16 @@ void LLVOAvatar::updateAttachmentOverrides()
#endif
}
+void LLVOAvatar::notifyAttachmentMeshLoaded()
+{
+ if (!isFullyLoaded())
+ {
+ // We just received mesh or skin info
+ // Reset timer to wait for more potential meshes or changes
+ mFullyLoadedTimer.reset();
+ }
+}
+
//-----------------------------------------------------------------------------
// addAttachmentOverridesForObject
//-----------------------------------------------------------------------------
@@ -8156,7 +8169,7 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
// Note that textures can causes 60s delay on thier own
// so this delay might end up on top of textures' delay
mFirstUseDelaySeconds = llclamp(
- mFirstSeenTimer.getElapsedTimeF32(),
+ mFirstAppearanceMessageTimer.getElapsedTimeF32(),
FIRST_APPEARANCE_CLOUD_MIN_DELAY,
FIRST_APPEARANCE_CLOUD_MAX_DELAY);
@@ -8926,6 +8939,9 @@ void LLVOAvatar::onFirstTEMessageReceived()
mMeshTexturesDirty = TRUE;
gPipeline.markGLRebuild(this);
+
+ mFirstAppearanceMessageTimer.reset();
+ mFullyLoadedTimer.reset();
}
}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index ab2a2daf49..7c2d71802e 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -206,7 +206,7 @@ public:
inline LLJoint* getSkeletonJoint(S32 joint_num) { return mSkeleton[joint_num]; }
inline size_t getSkeletonJointCount() const { return mSkeleton.size(); }
-
+ void notifyAttachmentMeshLoaded();
void addAttachmentOverridesForObject(LLViewerObject *vo, std::set<LLUUID>* meshes_seen = NULL, bool recursive = true);
void removeAttachmentOverridesForObject(const LLUUID& mesh_id);
void removeAttachmentOverridesForObject(LLViewerObject *vo);
@@ -379,7 +379,7 @@ protected:
private:
BOOL mFirstFullyVisible;
F32 mFirstUseDelaySeconds;
- LLFrameTimer mFirstSeenTimer;
+ LLFrameTimer mFirstAppearanceMessageTimer;
BOOL mFullyLoaded;
BOOL mPreviousFullyLoaded;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index e8bc015d78..8bc570311c 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1170,13 +1170,17 @@ void LLVOVolume::notifyMeshLoaded()
mSculptChanged = TRUE;
gPipeline.markRebuild(mDrawable, LLDrawable::REBUILD_GEOMETRY, TRUE);
- if (getAvatar() && !isAnimatedObject())
+ LLVOAvatar *av = getAvatar();
+ if (av && !isAnimatedObject())
{
- getAvatar()->addAttachmentOverridesForObject(this);
+ av->addAttachmentOverridesForObject(this);
+ av->notifyAttachmentMeshLoaded();
}
- if (getControlAvatar() && isAnimatedObject())
+ LLControlAvatar *cav = getControlAvatar();
+ if (cav && isAnimatedObject())
{
- getControlAvatar()->addAttachmentOverridesForObject(this);
+ cav->addAttachmentOverridesForObject(this);
+ cav->notifyAttachmentMeshLoaded();
}
updateVisualComplexity();
}