summaryrefslogtreecommitdiff
path: root/indra/newview/llvoavatar.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llvoavatar.cpp')
-rw-r--r--indra/newview/llvoavatar.cpp56
1 files changed, 31 insertions, 25 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index f5e83ed025..86987f4c78 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -655,6 +655,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mNameMute(FALSE),
mRenderGroupTitles(sRenderGroupTitles),
mNameAppearance(FALSE),
+ mNameCloud(FALSE),
mFirstTEMessageReceived( FALSE ),
mFirstAppearanceMessageReceived( FALSE ),
mCulled( FALSE ),
@@ -2769,25 +2770,20 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
if (mNameText.notNull() && firstname && lastname)
{
- BOOL is_away = mSignaledAnimations.find(ANIM_AGENT_AWAY) != mSignaledAnimations.end();
- BOOL is_busy = mSignaledAnimations.find(ANIM_AGENT_BUSY) != mSignaledAnimations.end();
- BOOL is_appearance = mSignaledAnimations.find(ANIM_AGENT_CUSTOMIZE) != mSignaledAnimations.end();
- BOOL is_muted;
- if (isSelf())
- {
- is_muted = FALSE;
- }
- else
- {
- is_muted = LLMuteList::getInstance()->isMuted(getID());
- }
+ const BOOL is_away = mSignaledAnimations.find(ANIM_AGENT_AWAY) != mSignaledAnimations.end();
+ const BOOL is_busy = mSignaledAnimations.find(ANIM_AGENT_BUSY) != mSignaledAnimations.end();
+ const BOOL is_appearance = mSignaledAnimations.find(ANIM_AGENT_CUSTOMIZE) != mSignaledAnimations.end();
+ const BOOL is_muted = isSelf() ? FALSE : LLMuteList::getInstance()->isMuted(getID());
+ const BOOL is_cloud = getIsCloud();
if (mNameString.empty() ||
new_name ||
(!title && !mTitle.empty()) ||
(title && mTitle != title->getString()) ||
(is_away != mNameAway || is_busy != mNameBusy || is_muted != mNameMute)
- || is_appearance != mNameAppearance)
+ || is_appearance != mNameAppearance
+ || is_cloud != mNameCloud
+ )
{
std::string line;
if (!sRenderGroupTitles)
@@ -2841,7 +2837,12 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
}
line += ")";
}
- if (is_appearance)
+ if (is_cloud)
+ {
+ line += "\n";
+ line += "(" + LLTrans::getString("LoadingData") + ")";
+ }
+ else if (is_appearance)
{
line += "\n";
line += LLTrans::getString("AvatarEditingAppearance");
@@ -2850,6 +2851,7 @@ void LLVOAvatar::idleUpdateNameTag(const LLVector3& root_pos_last)
mNameBusy = is_busy;
mNameMute = is_muted;
mNameAppearance = is_appearance;
+ mNameCloud = is_cloud;
mTitle = title ? title->getString() : "";
LLStringFn::replace_ascii_controlchars(mTitle,LL_UNKNOWN_CHAR);
mNameString = utf8str_to_wstring(line);
@@ -5651,6 +5653,8 @@ void LLVOAvatar::sitOnObject(LLViewerObject *sit_object)
mDrawable->mXform.setRotation(mDrawable->getWorldRotation() * inv_obj_rot);
gPipeline.markMoved(mDrawable, TRUE);
+ // Notice that removing sitDown() from here causes avatars sitting on
+ // objects to be not rendered for new arrivals. See EXT-6835 and EXT-1655.
sitDown(TRUE);
mRoot.getXform()->setParent(&sit_object->mDrawable->mXform); // LLVOAvatar::sitOnObject
mRoot.setPosition(getPosition());
@@ -5823,27 +5827,29 @@ BOOL LLVOAvatar::isVisible() const
&& (mDrawable->isVisible() || mIsDummy);
}
-// call periodically to keep isFullyLoaded up to date.
-// returns true if the value has changed.
-BOOL LLVOAvatar::updateIsFullyLoaded()
+// Determine if we have enough avatar data to render
+BOOL LLVOAvatar::getIsCloud()
{
- // a "heuristic" to determine if we have enough avatar data to render
- // (to avoid rendering a "Ruth" - DEV-3168)
- BOOL loading = FALSE;
-
- // do we have a shape?
+ // Do we have a shape?
if (visualParamWeightsAreDefault())
{
- loading = TRUE;
+ return TRUE;
}
if (!isTextureDefined(TEX_LOWER_BAKED) ||
!isTextureDefined(TEX_UPPER_BAKED) ||
!isTextureDefined(TEX_HEAD_BAKED))
{
- loading = TRUE;
+ return TRUE;
}
-
+ return FALSE;
+}
+
+// call periodically to keep isFullyLoaded up to date.
+// returns true if the value has changed.
+BOOL LLVOAvatar::updateIsFullyLoaded()
+{
+ const BOOL loading = getIsCloud();
updateRuthTimer(loading);
return processFullyLoadedChange(loading);
}