summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-04-15 20:35:52 +0100
committerTofu Linden <tofu.linden@lindenlab.com>2010-04-15 20:35:52 +0100
commit12dadac44e9d5af8728e7bedab586683b2660cb4 (patch)
tree7cca1b6dac003313bfa20b712b8d0546e780af9d /indra
parent0bd41cbf828181ad013964c68ab12d1f00f69bfa (diff)
parentbba063c0c19d121cbecaecee92c0894c5b83eb2b (diff)
merge from viewer-hotfix
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llvoavatar.cpp54
-rw-r--r--indra/newview/llvoavatar.h4
-rw-r--r--indra/newview/llvoavatarself.cpp22
-rw-r--r--indra/newview/llvoavatarself.h2
4 files changed, 43 insertions, 39 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index af833db9c3..ba0da9a4c6 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -656,6 +656,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mNameMute(FALSE),
mRenderGroupTitles(sRenderGroupTitles),
mNameAppearance(FALSE),
+ mNameCloud(FALSE),
mFirstTEMessageReceived( FALSE ),
mFirstAppearanceMessageReceived( FALSE ),
mCulled( FALSE ),
@@ -2764,25 +2765,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)
@@ -2836,7 +2832,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");
@@ -2845,6 +2846,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);
@@ -5812,27 +5814,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);
}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index d5485413f4..55753233b0 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -247,7 +247,8 @@ public:
public:
BOOL isFullyLoaded() const;
protected:
- virtual BOOL updateIsFullyLoaded();
+ virtual BOOL getIsCloud();
+ BOOL updateIsFullyLoaded();
BOOL processFullyLoadedChange(bool loading);
void updateRuthTimer(bool loading);
F32 calcMorphAmount();
@@ -828,6 +829,7 @@ private:
BOOL mNameBusy;
BOOL mNameMute;
BOOL mNameAppearance;
+ BOOL mNameCloud;
BOOL mRenderGroupTitles;
//--------------------------------------------------------------------
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 8b87254f81..7473adda1f 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -1697,22 +1697,20 @@ void LLVOAvatarSelf::dumpTotalLocalTextureByteCount()
llinfos << "Total Avatar LocTex GL:" << (gl_bytes/1024) << "KB" << llendl;
}
-BOOL LLVOAvatarSelf::updateIsFullyLoaded()
+BOOL LLVOAvatarSelf::getIsCloud()
{
- BOOL loading = FALSE;
-
// do we have our body parts?
if (gAgentWearables.getWearableCount(WT_SHAPE) == 0 ||
gAgentWearables.getWearableCount(WT_HAIR) == 0 ||
gAgentWearables.getWearableCount(WT_EYES) == 0 ||
gAgentWearables.getWearableCount(WT_SKIN) == 0)
{
- loading = TRUE;
+ return TRUE;
}
if (!isTextureDefined(TEX_HAIR, 0))
{
- loading = TRUE;
+ return TRUE;
}
if (!mPreviousFullyLoaded)
@@ -1720,13 +1718,13 @@ BOOL LLVOAvatarSelf::updateIsFullyLoaded()
if (!isLocalTextureDataAvailable(mBakedTextureDatas[BAKED_LOWER].mTexLayerSet) &&
(!isTextureDefined(TEX_LOWER_BAKED, 0)))
{
- loading = TRUE;
+ return TRUE;
}
if (!isLocalTextureDataAvailable(mBakedTextureDatas[BAKED_UPPER].mTexLayerSet) &&
(!isTextureDefined(TEX_UPPER_BAKED, 0)))
{
- loading = TRUE;
+ return TRUE;
}
for (U32 i = 0; i < mBakedTextureDatas.size(); i++)
@@ -1734,23 +1732,23 @@ BOOL LLVOAvatarSelf::updateIsFullyLoaded()
if (i == BAKED_SKIRT && !isWearingWearableType(WT_SKIRT))
continue;
- BakedTextureData& texture_data = mBakedTextureDatas[i];
+ const BakedTextureData& texture_data = mBakedTextureDatas[i];
if (!isTextureDefined(texture_data.mTextureIndex, 0))
continue;
// Check for the case that texture is defined but not sufficiently loaded to display anything.
- LLViewerTexture* baked_img = getImage( texture_data.mTextureIndex, 0 );
+ const LLViewerTexture* baked_img = getImage( texture_data.mTextureIndex, 0 );
if (!baked_img || !baked_img->hasGLTexture())
{
- loading = TRUE;
+ return TRUE;
}
-
}
}
- return processFullyLoadedChange(loading);
+ return FALSE;
}
+
const LLUUID& LLVOAvatarSelf::grabLocalTexture(ETextureIndex type, U32 index) const
{
if (canGrabLocalTexture(type, index))
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index 4856e82275..337d445eac 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -122,7 +122,7 @@ public:
// Loading state
//--------------------------------------------------------------------
public:
- /*virtual*/ BOOL updateIsFullyLoaded();
+ /*virtual*/ BOOL getIsCloud();
private:
//--------------------------------------------------------------------