From f25577649a2db9fa47f4bfe92453e34363f5831e Mon Sep 17 00:00:00 2001 From: Router Gray Date: Tue, 17 Dec 2019 06:34:27 -0600 Subject: [PATCH] [BOM] Fix universal wearables more, and correctly: Sync WT_COUNT and WT_UNKNOWN constants in llinventory.cpp and llwearable.h Reverted previous changes to textures.xml regarding this issue --- indra/llappearance/llwearabletype.h | 1 + indra/llinventory/llinventory.cpp | 6 ++++-- indra/newview/skins/default/textures/textures.xml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/indra/llappearance/llwearabletype.h b/indra/llappearance/llwearabletype.h index 6dec79fcb..ec946d5ad 100644 --- a/indra/llappearance/llwearabletype.h +++ b/indra/llappearance/llwearabletype.h @@ -58,6 +58,7 @@ public: WT_UNKNOWN = 17, // Singu note: used for corrupt wearables that do not have their type set in the inventory database. // While all the above values are serialized and stored in the database, this value is local only: // When a new item with value 17 is added by upstream, just increase this value to 18 (and WT_COUNT to 19). + // Keep WT_UNKNOWN and WT_COUNT in sync with llinventory.cpp WT_COUNT = 18, WT_INVALID = 255, diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 86992aee6..e14ae9027 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -1165,8 +1165,10 @@ bool LLInventoryItem::fromLLSD(const LLSD& sd, bool is_new) // mType, these are the two asset types that are IT_WEARABLE: static U32 AT_BODYPART = 13; // LLAssetType::AT_BODYPART // Viewer local values: - static U32 WT_UNKNOWN = 16; // LLWearableType::WT_UNKNOWN - static U32 WT_COUNT = 17; // LLWearableType::WT_COUNT + static U32 WT_UNKNOWN = 17; // LLWearableType::WT_UNKNOWN + static U32 WT_COUNT = 18; // LLWearableType::WT_COUNT + // Keep WT_UNKNOWN and WT_COUNT + // in sync with llwearabletype.h // The last 8 bits of mFlags contain the wearable type. static U32 II_FLAGS_SUBTYPE_MASK = 0xff; // LLInventoryItemFlags::II_FLAGS_SUBTYPE_MASK diff --git a/indra/newview/skins/default/textures/textures.xml b/indra/newview/skins/default/textures/textures.xml index 78742f1b4..6e7f64881 100644 --- a/indra/newview/skins/default/textures/textures.xml +++ b/indra/newview/skins/default/textures/textures.xml @@ -355,7 +355,7 @@ with the same filename but different name - +