summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llagent.cpp67
-rw-r--r--indra/newview/llagentwearables.cpp62
-rw-r--r--indra/newview/llagentwearables.h2
-rw-r--r--indra/newview/llappearancemgr.cpp2
-rw-r--r--indra/newview/skins/default/xui/it/panel_nearby_media.xml2
-rw-r--r--indra/newview/skins/default/xui/it/panel_stand_stop_flying.xml2
-rw-r--r--indra/newview/skins/default/xui/ja/floater_joystick.xml2
7 files changed, 73 insertions, 66 deletions
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index f96a59e97a..7d84f8d071 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -3088,21 +3088,30 @@ void LLAgent::processAgentCachedTextureResponse(LLMessageSystem *mesgsys, void *
mesgsys->getUUIDFast(_PREHASH_WearableData, _PREHASH_TextureID, texture_id, texture_block);
mesgsys->getU8Fast(_PREHASH_WearableData, _PREHASH_TextureIndex, texture_index, texture_block);
- if ((S32)texture_index < BAKED_NUM_INDICES
- && gAgentQueryManager.mActiveCacheQueries[texture_index] == query_id)
- {
- if (texture_id.notNull())
- {
- //llinfos << "Received cached texture " << (U32)texture_index << ": " << texture_id << llendl;
- gAgentAvatarp->setCachedBakedTexture(LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)texture_index), texture_id);
- //gAgentAvatarp->setTETexture( LLVOAvatar::sBakedTextureIndices[texture_index], texture_id );
- gAgentQueryManager.mActiveCacheQueries[texture_index] = 0;
- num_results++;
- }
- else
+
+ if ((S32)texture_index < TEX_NUM_INDICES )
+ {
+ const LLVOAvatarDictionary::TextureEntry *texture_entry = LLVOAvatarDictionary::instance().getTexture((ETextureIndex)texture_index);
+ if (texture_entry)
{
- // no cache of this bake. request upload.
- gAgentAvatarp->requestLayerSetUpload((EBakedTextureIndex)texture_index);
+ EBakedTextureIndex baked_index = texture_entry->mBakedTextureIndex;
+
+ if (gAgentQueryManager.mActiveCacheQueries[baked_index] == query_id)
+ {
+ if (texture_id.notNull())
+ {
+ //llinfos << "Received cached texture " << (U32)texture_index << ": " << texture_id << llendl;
+ gAgentAvatarp->setCachedBakedTexture((ETextureIndex)texture_index, texture_id);
+ //gAgentAvatarp->setTETexture( LLVOAvatar::sBakedTextureIndices[texture_index], texture_id );
+ gAgentQueryManager.mActiveCacheQueries[baked_index] = 0;
+ num_results++;
+ }
+ else
+ {
+ // no cache of this bake. request upload.
+ gAgentAvatarp->requestLayerSetUpload(baked_index);
+ }
+ }
}
}
}
@@ -3526,7 +3535,6 @@ void LLAgent::sendAgentSetAppearance()
return;
}
-
llinfos << "TAT: Sent AgentSetAppearance: " << gAgentAvatarp->getBakedStatusForPrintout() << llendl;
//dumpAvatarTEs( "sendAgentSetAppearance()" );
@@ -3577,32 +3585,15 @@ void LLAgent::sendAgentSetAppearance()
llinfos << "TAT: Sending cached texture data" << llendl;
for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
{
- const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index);
- LLUUID hash;
- for (U8 i=0; i < baked_dict->mWearables.size(); i++)
- {
- // LLWearableType::EType wearable_type = gBakedWearableMap[baked_index][wearable_num];
- const LLWearableType::EType wearable_type = baked_dict->mWearables[i];
- for (U8 wearable_index =0; wearable_index < gAgentWearables.getWearableCount(wearable_type); ++wearable_index)
- {
- const LLWearable* wearable = gAgentWearables.getWearable(wearable_type,wearable_index);
- if (wearable)
- {
- // MULTI-WEARABLE: make order-dependent (use MD5 hash)
- hash ^= wearable->getAssetID();
- }
- }
- }
+ LLUUID hash = gAgentWearables.computeBakedTextureHash((EBakedTextureIndex) baked_index);
+
if (hash.notNull())
{
- hash ^= baked_dict->mWearablesHashID;
+ ETextureIndex texture_index = LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex) baked_index);
+ msg->nextBlockFast(_PREHASH_WearableData);
+ msg->addUUIDFast(_PREHASH_CacheID, hash);
+ msg->addU8Fast(_PREHASH_TextureIndex, (U8)texture_index);
}
-
- const ETextureIndex texture_index = LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)baked_index);
-
- msg->nextBlockFast(_PREHASH_WearableData);
- msg->addUUIDFast(_PREHASH_CacheID, hash);
- msg->addU8Fast(_PREHASH_TextureIndex, (U8)texture_index);
}
msg->nextBlockFast(_PREHASH_ObjectData);
gAgentAvatarp->sendAppearanceMessage( gMessageSystem );
diff --git a/indra/newview/llagentwearables.cpp b/indra/newview/llagentwearables.cpp
index 545c5b845b..6b5e43973e 100644
--- a/indra/newview/llagentwearables.cpp
+++ b/indra/newview/llagentwearables.cpp
@@ -1565,37 +1565,18 @@ void LLAgentWearables::queryWearableCache()
S32 num_queries = 0;
for (U8 baked_index = 0; baked_index < BAKED_NUM_INDICES; baked_index++)
{
- const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture((EBakedTextureIndex)baked_index);
- LLMD5 hash;
- bool hash_computed = false;
- for (U8 i=0; i < baked_dict->mWearables.size(); i++)
+ LLUUID hash_id = computeBakedTextureHash((EBakedTextureIndex) baked_index);
+ if (hash_id.notNull())
{
- const LLWearableType::EType baked_type = baked_dict->mWearables[i];
- const U32 num_wearables = getWearableCount(baked_type);
- for (U32 index = 0; index < num_wearables; ++index)
- {
- const LLWearable* wearable = getWearable(baked_type,index);
- if (wearable)
- {
- LLUUID asset_id = wearable->getAssetID();
- hash.update((const unsigned char*)asset_id.mData, UUID_BYTES);
- hash_computed = true;
- }
- }
- }
- hash.finalize();
- if (hash_computed)
- {
- LLUUID hash_id;
- hash.raw_digest(hash_id.mData);
- hash_id ^= baked_dict->mWearablesHashID;
num_queries++;
// *NOTE: make sure at least one request gets packed
+ ETextureIndex te_index = LLVOAvatarDictionary::bakedToLocalTextureIndex((EBakedTextureIndex)baked_index);
+
//llinfos << "Requesting texture for hash " << hash << " in baked texture slot " << baked_index << llendl;
gMessageSystem->nextBlockFast(_PREHASH_WearableData);
gMessageSystem->addUUIDFast(_PREHASH_ID, hash_id);
- gMessageSystem->addU8Fast(_PREHASH_TextureIndex, (U8)baked_index);
+ gMessageSystem->addU8Fast(_PREHASH_TextureIndex, (U8)te_index);
}
gAgentQueryManager.mActiveCacheQueries[baked_index] = gAgentQueryManager.mWearablesCacheQueryID;
@@ -1607,6 +1588,39 @@ void LLAgentWearables::queryWearableCache()
gAgentQueryManager.mWearablesCacheQueryID++;
}
+LLUUID LLAgentWearables::computeBakedTextureHash(LLVOAvatarDefines::EBakedTextureIndex index)
+{
+ LLUUID hash_id;
+ bool hash_computed = false;
+ LLMD5 hash;
+
+ const LLVOAvatarDictionary::BakedEntry *baked_dict = LLVOAvatarDictionary::getInstance()->getBakedTexture(index);
+
+ for (U8 i=0; i < baked_dict->mWearables.size(); i++)
+ {
+ const LLWearableType::EType baked_type = baked_dict->mWearables[i];
+ const U32 num_wearables = getWearableCount(baked_type);
+ for (U32 index = 0; index < num_wearables; ++index)
+ {
+ const LLWearable* wearable = getWearable(baked_type,index);
+ if (wearable)
+ {
+ LLUUID asset_id = wearable->getAssetID();
+ hash.update((const unsigned char*)asset_id.mData, UUID_BYTES);
+ hash_computed = true;
+ }
+ }
+ }
+ if (hash_computed)
+ {
+ hash.update((const unsigned char*)baked_dict->mWearablesHashID.mData, UUID_BYTES);
+ hash.finalize();
+ hash.raw_digest(hash_id.mData);
+ }
+
+ return hash_id;
+}
+
// User has picked "remove from avatar" from a menu.
// static
void LLAgentWearables::userRemoveWearable(const LLWearableType::EType &type, const U32 &index)
diff --git a/indra/newview/llagentwearables.h b/indra/newview/llagentwearables.h
index 27453b5b25..734bd9fd47 100644
--- a/indra/newview/llagentwearables.h
+++ b/indra/newview/llagentwearables.h
@@ -150,6 +150,8 @@ protected:
public:
// Processes the initial wearables update message (if necessary, since the outfit folder makes it redundant)
static void processAgentInitialWearablesUpdate(LLMessageSystem* mesgsys, void** user_data);
+ LLUUID computeBakedTextureHash(LLVOAvatarDefines::EBakedTextureIndex index);
+
protected:
void sendAgentWearablesUpdate();
void sendAgentWearablesRequest();
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 57720382df..dcef86a5fc 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -1493,7 +1493,7 @@ void LLAppearanceMgr::addCOFItemLink(const LLInventoryItem *item, bool do_update
// Are these links to different items of the same body part
// type? If so, new item will replace old.
// TODO: MULTI-WEARABLE: check for wearable limit for clothing types
- else if (is_body_part)
+ else if (is_body_part && (vitem->isWearableType()) && (vitem->getWearableType() == wearable_type))
{
if (inv_item->getIsLinkType() && (vitem->getWearableType() == wearable_type))
{
diff --git a/indra/newview/skins/default/xui/it/panel_nearby_media.xml b/indra/newview/skins/default/xui/it/panel_nearby_media.xml
index 649b772424..01e21d520a 100644
--- a/indra/newview/skins/default/xui/it/panel_nearby_media.xml
+++ b/indra/newview/skins/default/xui/it/panel_nearby_media.xml
@@ -16,7 +16,7 @@
(riproduzione)
</string>
<panel name="minimized_controls">
- <button label="Interrompi tutto" name="all_nearby_media_disable_btn" tool_tip="Spegni tutti i media nei dintorni"/>
+ <button label="Spegni" name="all_nearby_media_disable_btn" tool_tip="Spegni tutti i media nei dintorni"/>
<button label="Accendi tutto" name="all_nearby_media_enable_btn" tool_tip="Accendi tutti i media nei dintorni"/>
<button name="open_prefs_btn" tool_tip="Accedi alle preferenze del media"/>
<button label="Più &gt;&gt;" label_selected="Meno &lt;&lt;" name="more_btn" tool_tip="Opzioni avanzate"/>
diff --git a/indra/newview/skins/default/xui/it/panel_stand_stop_flying.xml b/indra/newview/skins/default/xui/it/panel_stand_stop_flying.xml
index 198ebf4b2a..e4ff7019ec 100644
--- a/indra/newview/skins/default/xui/it/panel_stand_stop_flying.xml
+++ b/indra/newview/skins/default/xui/it/panel_stand_stop_flying.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<!-- Width and height of this panel should be synchronized with "panel_modes" in the floater_moveview.xml-->
<panel name="panel_stand_stop_flying">
- <button label="Stai in piedi" name="stand_btn" tool_tip="Clicca qui per alzarti."/>
+ <button label="Alzati" name="stand_btn" tool_tip="Clicca qui per alzarti."/>
<button label="Ferma il volo" name="stop_fly_btn" tool_tip="Ferma il volo"/>
</panel>
diff --git a/indra/newview/skins/default/xui/ja/floater_joystick.xml b/indra/newview/skins/default/xui/ja/floater_joystick.xml
index 65eeebe4ed..daa480ef5a 100644
--- a/indra/newview/skins/default/xui/ja/floater_joystick.xml
+++ b/indra/newview/skins/default/xui/ja/floater_joystick.xml
@@ -89,7 +89,7 @@
<spinner left="205" name="BuildAxisDeadZone3" width="50"/>
<spinner left="275" name="FlycamAxisDeadZone3" width="50"/>
<text name="Feathering">
- 羽毛
+ 感度調整
</text>
<slider label="" left="126" name="AvatarFeathering" width="67"/>
<slider label="" left="196" name="BuildFeathering" width="67"/>