summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llvoavatar.cpp41
-rwxr-xr-xindra/newview/llvoavatar.h1
2 files changed, 29 insertions, 13 deletions
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index d953a4b99e..45c7a59b24 100755
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -192,6 +192,8 @@ const S32 MAX_BUBBLE_CHAT_UTTERANCES = 12;
const F32 CHAT_FADE_TIME = 8.0;
const F32 BUBBLE_CHAT_TIME = CHAT_FADE_TIME * 3.f;
+const S32 SERVER_GENERATED_APPEARANCE = 359949045;
+
const LLColor4 DUMMY_COLOR = LLColor4(0.5,0.5,0.5,1.0);
enum ERenderName
@@ -693,7 +695,8 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar")),
mLastRezzedStatus(-1),
mIsEditingAppearance(FALSE),
- mUseLocalAppearance(FALSE)
+ mUseLocalAppearance(FALSE),
+ mUseServerBakes(TRUE)
{
LLMemType mt(LLMemType::MTYPE_AVATAR);
//VTResume(); // VTune
@@ -4581,7 +4584,7 @@ void LLVOAvatar::updateTextures()
if (isIndexBakedTexture((ETextureIndex)texture_index)
&& imagep->getID() != IMG_DEFAULT_AVATAR
&& imagep->getID() != IMG_INVISIBLE
- && !LLAppearanceMgr::instance().useServerTextureBaking()
+ && !mUseServerBakes
&& !imagep->getTargetHost().isOk())
{
LL_WARNS_ONCE("Texture") << "LLVOAvatar::updateTextures No host for texture "
@@ -4676,10 +4679,10 @@ void LLVOAvatar::addBakedTextureStats( LLViewerFetchedTexture* imagep, F32 pixel
//the texture pipeline will stop fetching this texture.
imagep->resetTextureStats();
- if (!LLAppearanceMgr::instance().useServerTextureBaking())
- {
- imagep->setCanUseHTTP(false); //turn off http fetching for baked textures.
- }
+ // TODO: currently default to HTTP texture and fall back to UDP if cannot be found there.
+ // Once server messaging is in place, we should call setCanUseHTTP(false) for old style
+ // appearance requests
+ imagep->setCanUseHTTP(true);
imagep->setMaxVirtualSizeResetInterval(MAX_TEXTURE_VIRTURE_SIZE_RESET_INTERVAL);
imagep->resetMaxVirtualSizeResetCounter() ;
@@ -4730,6 +4733,7 @@ const std::string LLVOAvatar::getImageURL(const U8 te, const LLUUID &uuid)
if (texture_entry != NULL)
{
url = gSavedSettings.getString("AgentAppearanceServiceURL") + "texture/" + getID().asString() + "/" + texture_entry->mDefaultImageName + "/" + uuid.asString();
+ //llinfos << "baked texture url: " << url << llendl;
}
}
return url;
@@ -7323,14 +7327,25 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
parseTEMessage(mesgsys, _PREHASH_ObjectData, -1, tec);
// dumpAvatarTEs( "POST processAvatarAppearance()" );
+ // Extract COF Version field hacked into local texture id.
+ LLUUID flags_id = ((LLUUID*)tec.image_data)[0];
+ S32 this_update_cof_version = (flags_id.mData[0] << 24) + (flags_id.mData[1] << 16) +(flags_id.mData[2] << 8) +flags_id.mData[3];
+ S32 message_type = (flags_id.mData[4] << 24) + (flags_id.mData[5] << 16) +(flags_id.mData[6] << 8) +flags_id.mData[7];
+
+ if (message_type == SERVER_GENERATED_APPEARANCE)
+ {
+ mUseServerBakes = true;
+ }
+ else
+ {
+ mUseServerBakes = false;
+ }
+
+ S32 last_update_request_cof_version = LLAppearanceMgr::instance().mLastUpdateRequestCOFVersion;
+
// Check for stale update.
- if (isSelf() && LLAppearanceMgr::instance().useServerTextureBaking())
+ if (isSelf() && mUseServerBakes)
{
- // Extract COF Version field hacked into local texture id.
- LLUUID texture_id = ((LLUUID*)tec.image_data)[0];
- S32 last_update_request_cof_version = LLAppearanceMgr::instance().mLastUpdateRequestCOFVersion;
- S32 *s_words = (S32*) texture_id.mData;
- S32 this_update_cof_version = s_words[0];
if ((this_update_cof_version > 0) &&
(this_update_cof_version < last_update_request_cof_version))
{
@@ -7475,7 +7490,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
// If all of the avatars are completely baked, release the global image caches to conserve memory.
LLVOAvatar::cullAvatarsByPixelArea();
- if (isSelf() && LLAppearanceMgr::instance().useServerTextureBaking())
+ if (isSelf())
{
mUseLocalAppearance = false;
}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 2b999891f9..4283c0e017 100755
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -702,6 +702,7 @@ private:
F32 mLastAppearanceBlendTime;
BOOL mIsEditingAppearance;
BOOL mUseLocalAppearance;
+ BOOL mUseServerBakes;
//--------------------------------------------------------------------
// Clothing colors (convenience functions to access visual parameters)