Refactoring.
-New LLWearableType class, uses LLDictionary for typeindex<->typename<->assettype<->typelabel conversions. -LLAvatarDefines cleaned up. Uses LLDictionary for Mesh, TE, Baked lookups/conversions. -LLAgentWearables TEWearable stuff removed. Use LLAvatarDefines. -LLWearable WearableType conversions yanked. Use LLWearableType. -LLVOAvatar TEWEarable stuff removed. Use LLAvatarDefines. -EWearableType now LLWearableType::EType -LLWearable::getID() renamed to LLWearable::getAssetID() VOAvatar cleanup. -Removed redundant TEWearable functions. -Some code migrated to F32 LLVOAvatar::calcMorphAmount(). No functional change. -LLVOAvatar::removeMissingBakedTextures virtual. Implementation moved to VOAvatarSelf
This commit is contained in:
@@ -9165,68 +9165,19 @@ class LLEditEnableTakeOff : public view_listener_t
|
||||
{
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
bool new_value = false;
|
||||
std::string control_name = userdata["control"].asString();
|
||||
std::string clothing = userdata["data"].asString();
|
||||
bool new_value = false;
|
||||
if (clothing == "shirt")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable((void *)WT_SHIRT);
|
||||
}
|
||||
if (clothing == "pants")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable((void *)WT_PANTS);
|
||||
}
|
||||
if (clothing == "shoes")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable((void *)WT_SHOES);
|
||||
}
|
||||
if (clothing == "socks")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable((void *)WT_SOCKS);
|
||||
}
|
||||
if (clothing == "jacket")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable((void *)WT_JACKET);
|
||||
}
|
||||
if (clothing == "gloves")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable((void *)WT_GLOVES);
|
||||
}
|
||||
if (clothing == "undershirt")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable((void *)WT_UNDERSHIRT);
|
||||
}
|
||||
if (clothing == "underpants")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable((void *)WT_UNDERPANTS);
|
||||
}
|
||||
if (clothing == "skirt")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable((void *)WT_SKIRT);
|
||||
}
|
||||
if (clothing == "alpha")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable((void *)WT_ALPHA);
|
||||
}
|
||||
if (clothing == "tattoo")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable((void *)WT_TATTOO);
|
||||
}
|
||||
if (clothing == "physics")
|
||||
{
|
||||
new_value = LLAgentWearables::selfHasWearable((void *)WT_PHYSICS);
|
||||
}
|
||||
|
||||
LLWearableType::EType type = LLWearableType::typeNameToType(clothing);
|
||||
if (type >= LLWearableType::WT_SHAPE && type < LLWearableType::WT_COUNT)
|
||||
// [RLVa:KB] - Checked: 2009-07-07 (RLVa-1.1.3b) | Modified: RLVa-1.1.3b | OK
|
||||
// Why aren't they using LLWearable::typeNameToType()? *confuzzled*
|
||||
if ( (rlv_handler_t::isEnabled()) && (!gRlvWearableLocks.canRemove(LLWearable::typeNameToType(clothing))) )
|
||||
{
|
||||
new_value = false;
|
||||
}
|
||||
if ( !(rlv_handler_t::isEnabled()) || (gRlvWearableLocks.canRemove(type)) )
|
||||
// [/RLVa:KB]
|
||||
|
||||
new_value = LLAgentWearables::selfHasWearable((void *)type);
|
||||
|
||||
gMenuHolder->findControl(control_name)->setValue(new_value);
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -9235,58 +9186,17 @@ class LLEditTakeOff : public view_listener_t
|
||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||
{
|
||||
std::string clothing = userdata.asString();
|
||||
if (clothing == "shirt")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_SHIRT);
|
||||
}
|
||||
else if (clothing == "pants")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_PANTS);
|
||||
}
|
||||
else if (clothing == "shoes")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_SHOES);
|
||||
}
|
||||
else if (clothing == "socks")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_SOCKS);
|
||||
}
|
||||
else if (clothing == "jacket")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_JACKET);
|
||||
}
|
||||
else if (clothing == "gloves")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_GLOVES);
|
||||
}
|
||||
else if (clothing == "undershirt")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_UNDERSHIRT);
|
||||
}
|
||||
else if (clothing == "underpants")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_UNDERPANTS);
|
||||
}
|
||||
else if (clothing == "skirt")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_SKIRT);
|
||||
}
|
||||
else if (clothing == "alpha")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_ALPHA);
|
||||
}
|
||||
else if (clothing == "tattoo")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_TATTOO);
|
||||
}
|
||||
else if (clothing == "physics")
|
||||
{
|
||||
LLAgentWearables::userRemoveWearable((void*)WT_PHYSICS);
|
||||
}
|
||||
else if (clothing == "all")
|
||||
if (clothing == "all")
|
||||
{
|
||||
LLAgentWearables::userRemoveAllClothes(NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
LLWearableType::EType type = LLWearableType::typeNameToType(clothing);
|
||||
if (type >= LLWearableType::WT_SHAPE
|
||||
&& type < LLWearableType::WT_COUNT)
|
||||
LLAgentWearables::userRemoveWearable((void*)type);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user