[RLVa] Modernizations
License updates, comment updates, settings cleanup, macros cleanup, dead code removal, etc.
This commit is contained in:
@@ -222,17 +222,6 @@
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
</map>
|
</map>
|
||||||
<key>WarnFirstRLVGiveToRLV</key>
|
|
||||||
<map>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string>Enables FirstRLVGiveToRLV warning dialog</string>
|
|
||||||
<key>Persist</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
<key>Type</key>
|
|
||||||
<string>Boolean</string>
|
|
||||||
<key>Value</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
</map>
|
|
||||||
<key>ForceInitialCOFDelay</key>
|
<key>ForceInitialCOFDelay</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|||||||
@@ -583,7 +583,7 @@ public:
|
|||||||
void onWearableAssetFetch(LLViewerWearable *wearable);
|
void onWearableAssetFetch(LLViewerWearable *wearable);
|
||||||
void onAllComplete();
|
void onAllComplete();
|
||||||
|
|
||||||
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a
|
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0)
|
||||||
bool pollStopped();
|
bool pollStopped();
|
||||||
// [/SL:KB]
|
// [/SL:KB]
|
||||||
|
|
||||||
@@ -670,7 +670,7 @@ void LLWearableHoldingPattern::eraseTypeToRecover(LLWearableType::EType type)
|
|||||||
mTypesToRecover.erase(type);
|
mTypesToRecover.erase(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-3.0.0a) | Added: Catznip-2.1.2a
|
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-06-19 (Catznip-2.1)
|
||||||
//void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items)
|
//void LLWearableHoldingPattern::setObjItems(const LLInventoryModel::item_array_t& items)
|
||||||
//{
|
//{
|
||||||
// mObjItems = items;
|
// mObjItems = items;
|
||||||
@@ -780,10 +780,11 @@ void LLWearableHoldingPattern::onAllComplete()
|
|||||||
LL_INFOS("Avatar") << self_av_string() << "Updating agent wearables with " << mResolved << " wearable items " << LL_ENDL;
|
LL_INFOS("Avatar") << self_av_string() << "Updating agent wearables with " << mResolved << " wearable items " << LL_ENDL;
|
||||||
LLAppearanceMgr::instance().updateAgentWearables(this, false);
|
LLAppearanceMgr::instance().updateAgentWearables(this, false);
|
||||||
|
|
||||||
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-3.0.0a) | Added: Catznip-2.1.2a
|
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-03-22 (Catznip-2.1)
|
||||||
// // Update attachments to match those requested.
|
// // Update attachments to match those requested.
|
||||||
// if (isAgentAvatarValid())
|
// if (isAgentAvatarValid())
|
||||||
// {
|
// {
|
||||||
|
// LL_DEBUGS("Avatar") << self_av_string() << "Updating " << mObjItems.count() << " attachments" << LL_ENDL;
|
||||||
// llinfos << "Updating " << mObjItems.count() << " attachments" << llendl;
|
// llinfos << "Updating " << mObjItems.count() << " attachments" << llendl;
|
||||||
// LLAgentWearables::userUpdateAttachments(mObjItems);
|
// LLAgentWearables::userUpdateAttachments(mObjItems);
|
||||||
// }
|
// }
|
||||||
@@ -821,7 +822,7 @@ bool LLWearableHoldingPattern::pollFetchCompletion()
|
|||||||
// runway skip here?
|
// runway skip here?
|
||||||
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
||||||
|
|
||||||
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a
|
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0)
|
||||||
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
|
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
|
||||||
doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this));
|
doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this));
|
||||||
return true;
|
return true;
|
||||||
@@ -897,7 +898,7 @@ void recovered_item_cb(const LLUUID& item_id, LLWearableType::EType type, LLView
|
|||||||
// runway skip here?
|
// runway skip here?
|
||||||
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
||||||
|
|
||||||
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a
|
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0)
|
||||||
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
|
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
|
||||||
return;
|
return;
|
||||||
// [/SL:KB]
|
// [/SL:KB]
|
||||||
@@ -971,7 +972,7 @@ void LLWearableHoldingPattern::clearCOFLinksForMissingWearables()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a
|
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0)
|
||||||
bool LLWearableHoldingPattern::pollStopped()
|
bool LLWearableHoldingPattern::pollStopped()
|
||||||
{
|
{
|
||||||
// We have to keep on polling until we're sure that all callbacks have completed or they'll cause a crash
|
// We have to keep on polling until we're sure that all callbacks have completed or they'll cause a crash
|
||||||
@@ -991,7 +992,7 @@ bool LLWearableHoldingPattern::pollMissingWearables()
|
|||||||
// runway skip here?
|
// runway skip here?
|
||||||
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
llwarns << self_av_string() << "skipping because LLWearableHolding pattern is invalid (superceded by later outfit request)" << llendl;
|
||||||
|
|
||||||
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-3.0.0a) | Added: Catznip-2.0.0a
|
// [SL:KB] - Patch: Appearance-COFCorruption | Checked: 2010-04-14 (Catznip-2.0)
|
||||||
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
|
// If we were signalled to stop then we shouldn't do anything else except poll for when it's safe to delete ourselves
|
||||||
doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this));
|
doOnIdleRepeating(boost::bind(&LLWearableHoldingPattern::pollStopped, this));
|
||||||
return true;
|
return true;
|
||||||
@@ -1386,7 +1387,7 @@ bool LLAppearanceMgr::wearItemOnAvatar(const LLUUID& item_id_to_wear, bool do_up
|
|||||||
|
|
||||||
if (gInventory.isObjectDescendentOf(item_to_wear->getUUID(), gInventory.getLibraryRootFolderID()))
|
if (gInventory.isObjectDescendentOf(item_to_wear->getUUID(), gInventory.getLibraryRootFolderID()))
|
||||||
{
|
{
|
||||||
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(&wear_on_avatar_cb,_1,replace));
|
LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(wear_on_avatar_cb,_1,replace));
|
||||||
copy_inventory_item(gAgent.getID(), item_to_wear->getPermissions().getOwner(), item_to_wear->getUUID(), LLUUID::null, std::string(), cb);
|
copy_inventory_item(gAgent.getID(), item_to_wear->getPermissions().getOwner(), item_to_wear->getUUID(), LLUUID::null, std::string(), cb);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -1744,7 +1745,7 @@ bool LLAppearanceMgr::getCanReplaceCOF(const LLUUID& outfit_cat_id)
|
|||||||
|
|
||||||
// Check whether it's the base outfit.
|
// Check whether it's the base outfit.
|
||||||
// if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID())
|
// if (outfit_cat_id.isNull() || outfit_cat_id == getBaseOutfitUUID())
|
||||||
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-3.0.0a) | Added: Catznip-2.1.2d
|
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-09-21 (Catznip-2.1)
|
||||||
if ( (outfit_cat_id.isNull()) || ((outfit_cat_id == getBaseOutfitUUID()) && (!isOutfitDirty())) )
|
if ( (outfit_cat_id.isNull()) || ((outfit_cat_id == getBaseOutfitUUID()) && (!isOutfitDirty())) )
|
||||||
// [/SL:KB]
|
// [/SL:KB]
|
||||||
{
|
{
|
||||||
@@ -1798,8 +1799,19 @@ void LLAppearanceMgr::purgeCategory(const LLUUID& category, bool keep_outfit_lin
|
|||||||
continue;
|
continue;
|
||||||
if (item->getIsLinkType())
|
if (item->getIsLinkType())
|
||||||
{
|
{
|
||||||
|
#if 0
|
||||||
|
if (keep_items && keep_items->find(item) != LLInventoryModel::item_array_t::FAIL)
|
||||||
|
{
|
||||||
|
llinfos << "preserved item" << llendl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
gInventory.purgeObject(item->getUUID());
|
||||||
|
}
|
||||||
|
#else
|
||||||
gInventory.purgeObject(item->getUUID());
|
gInventory.purgeObject(item->getUUID());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1892,9 +1904,8 @@ void LLAppearanceMgr::filterWearableItems(
|
|||||||
if (size <= 0)
|
if (size <= 0)
|
||||||
continue;
|
continue;
|
||||||
// S32 start_index = llmax(0,size-max_per_type);
|
// S32 start_index = llmax(0,size-max_per_type);
|
||||||
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-3.0.0a) | Added: Catznip-2.0.0h
|
// [SL:KB] - Patch: Appearance-Misc | Checked: 2010-05-11 (Catznip-2.0)
|
||||||
S32 start_index =
|
S32 start_index = llmax(0, size - ((LLAssetType::AT_BODYPART == LLWearableType::getAssetType((LLWearableType::EType)i)) ? 1 : max_per_type));
|
||||||
llmax(0, size - ((LLAssetType::AT_BODYPART == LLWearableType::getAssetType((LLWearableType::EType)i)) ? 1 : max_per_type));
|
|
||||||
// [/SL:KB[
|
// [/SL:KB[
|
||||||
for (S32 j = start_index; j<size; j++)
|
for (S32 j = start_index; j<size; j++)
|
||||||
{
|
{
|
||||||
@@ -1948,7 +1959,7 @@ void LLAppearanceMgr::updateCOF(LLInventoryModel::item_array_t& body_items_new,
|
|||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
{
|
{
|
||||||
// LLViewerInventoryCategory *pcat = gInventory.getCategory(category);
|
// LLViewerInventoryCategory *pcat = gInventory.getCategory(category);
|
||||||
// llinfos << "starting, cat " << (pcat ? pcat->getName() : "[UNKNOWN]") << llendl;
|
// LL_INFOS("Avatar") << self_av_string() << "starting, cat '" << (pcat ? pcat->getName() : "[UNKNOWN]") << "'" << LL_ENDL;
|
||||||
// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Added: RLVa-1.2.0b
|
// [RLVa:KB] - Checked: 2010-03-26 (RLVa-1.2.0b) | Added: RLVa-1.2.0b
|
||||||
// RELEASE-RLVa: [SL-2.0.0] If pcat ever gets used for anything further down the beta we'll know about it
|
// RELEASE-RLVa: [SL-2.0.0] If pcat ever gets used for anything further down the beta we'll know about it
|
||||||
llinfos << "starting" << llendl;
|
llinfos << "starting" << llendl;
|
||||||
@@ -2220,8 +2231,6 @@ void LLAppearanceMgr::updateAgentWearables(LLWearableHoldingPattern* holder, boo
|
|||||||
{
|
{
|
||||||
gAgentWearables.setWearableOutfit(items, wearables, !append);
|
gAgentWearables.setWearableOutfit(items, wearables, !append);
|
||||||
}
|
}
|
||||||
|
|
||||||
// dec_busy_count();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void remove_non_link_items(LLInventoryModel::item_array_t &items)
|
static void remove_non_link_items(LLInventoryModel::item_array_t &items)
|
||||||
@@ -2334,7 +2343,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
|
|||||||
BoolSetter setIsInUpdateAppearanceFromCOF(mIsInUpdateAppearanceFromCOF);
|
BoolSetter setIsInUpdateAppearanceFromCOF(mIsInUpdateAppearanceFromCOF);
|
||||||
selfStartPhase("update_appearance_from_cof");
|
selfStartPhase("update_appearance_from_cof");
|
||||||
|
|
||||||
LL_INFOS("Avatar") << self_av_string() << "starting" << LL_ENDL;
|
LL_DEBUGS("Avatar") << self_av_string() << "starting" << LL_ENDL;
|
||||||
|
|
||||||
//checking integrity of the COF in terms of ordering of wearables,
|
//checking integrity of the COF in terms of ordering of wearables,
|
||||||
//checking and updating links' descriptions of wearables in the COF (before analyzed for "dirty" state)
|
//checking and updating links' descriptions of wearables in the COF (before analyzed for "dirty" state)
|
||||||
@@ -2372,7 +2381,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
|
|||||||
remove_non_link_items(wear_items);
|
remove_non_link_items(wear_items);
|
||||||
remove_non_link_items(obj_items);
|
remove_non_link_items(obj_items);
|
||||||
remove_non_link_items(gest_items);
|
remove_non_link_items(gest_items);
|
||||||
// [SL:KB] - Patch: Apperance-Misc | Checked: 2010-11-24 (Catznip-3.0.0a) | Added: Catzip-2.4.0f
|
// [SL:KB] - Patch: Apperance-Misc | Checked: 2010-11-24 (Catznip-2.4)
|
||||||
// Since we're following folder links we might have picked up new duplicates, or exceeded MAX_CLOTHING_PER_TYPE
|
// Since we're following folder links we might have picked up new duplicates, or exceeded MAX_CLOTHING_PER_TYPE
|
||||||
removeDuplicateItems(wear_items);
|
removeDuplicateItems(wear_items);
|
||||||
removeDuplicateItems(obj_items);
|
removeDuplicateItems(obj_items);
|
||||||
@@ -2387,7 +2396,7 @@ void LLAppearanceMgr::updateAppearanceFromCOF(bool update_base_outfit_ordering)
|
|||||||
dumpItemArray(wear_items,"asset_dump: wear_item");
|
dumpItemArray(wear_items,"asset_dump: wear_item");
|
||||||
dumpItemArray(obj_items,"asset_dump: obj_item");
|
dumpItemArray(obj_items,"asset_dump: obj_item");
|
||||||
|
|
||||||
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-3.0.0a) | Added: Catznip-2.2.0a
|
// [SL:KB] - Patch: Appearance-SyncAttach | Checked: 2010-09-22 (Catznip-2.2)
|
||||||
// Update attachments to match those requested.
|
// Update attachments to match those requested.
|
||||||
if (isAgentAvatarValid())
|
if (isAgentAvatarValid())
|
||||||
{
|
{
|
||||||
@@ -2704,7 +2713,6 @@ void LLAppearanceMgr::wearInventoryCategoryOnAvatar( LLInventoryCategory* catego
|
|||||||
void LLAppearanceMgr::wearOutfitByName(const std::string& name)
|
void LLAppearanceMgr::wearOutfitByName(const std::string& name)
|
||||||
{
|
{
|
||||||
LL_INFOS("Avatar") << self_av_string() << "Wearing category " << name << LL_ENDL;
|
LL_INFOS("Avatar") << self_av_string() << "Wearing category " << name << LL_ENDL;
|
||||||
//inc_busy_count();
|
|
||||||
|
|
||||||
LLInventoryModel::cat_array_t cat_array;
|
LLInventoryModel::cat_array_t cat_array;
|
||||||
LLInventoryModel::item_array_t item_array;
|
LLInventoryModel::item_array_t item_array;
|
||||||
@@ -3487,7 +3495,7 @@ public:
|
|||||||
// Error
|
// Error
|
||||||
/*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
|
/*virtual*/ void errorWithContent(U32 status, const std::string& reason, const LLSD& content)
|
||||||
{
|
{
|
||||||
llwarns << "appearance update request failed, status: " << status << " reason: " << reason << llendl;
|
llwarns << "appearance update request failed, status: " << status << " reason: " << reason << " code: " << content["code"].asInteger() << " error: \"" << content["error"].asString() << "\"" << llendl;
|
||||||
LL_DEBUGS("Avatar") << "content: " << ll_pretty_print_sd(content) << LL_ENDL;
|
LL_DEBUGS("Avatar") << "content: " << ll_pretty_print_sd(content) << LL_ENDL;
|
||||||
onFailure(status);
|
onFailure(status);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -965,15 +965,13 @@ void init_client_menu(LLMenuGL* menu)
|
|||||||
menu->addChild(sub_menu);
|
menu->addChild(sub_menu);
|
||||||
|
|
||||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.1b | OK
|
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-0.2.1b | OK
|
||||||
#ifdef RLV_ADVANCED_MENU
|
sub_menu = new LLMenuGL("RLVa Embedded");
|
||||||
sub_menu = new LLMenuGL("RLVa Embedded");
|
init_debug_rlva_menu(sub_menu);
|
||||||
init_debug_rlva_menu(sub_menu);
|
menu->addChild(sub_menu);
|
||||||
menu->addChild(sub_menu);
|
// Top Level Menu as well
|
||||||
// Top Level Menu as well
|
sub_menu = new LLMenuGL("RLVa Main");
|
||||||
sub_menu = new LLMenuGL("RLVa Main");
|
init_debug_rlva_menu(sub_menu);
|
||||||
init_debug_rlva_menu(sub_menu);
|
gMenuBarView->addChild(sub_menu);
|
||||||
gMenuBarView->addChild(sub_menu);
|
|
||||||
#endif // RLV_ADVANCED_MENU
|
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
|
|
||||||
sub_menu = new LLMenuGL("UI");
|
sub_menu = new LLMenuGL("UI");
|
||||||
@@ -1100,10 +1098,8 @@ void init_client_menu(LLMenuGL* menu)
|
|||||||
(void*)"ShowConsoleWindow"));
|
(void*)"ShowConsoleWindow"));
|
||||||
|
|
||||||
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-1.0.0e | OK
|
// [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Modified: RLVa-1.0.0e | OK
|
||||||
#ifdef RLV_ADVANCED_TOGGLE_RLVA
|
if (gSavedSettings.controlExists(RLV_SETTING_MAIN))
|
||||||
if (gSavedSettings.controlExists(RLV_SETTING_MAIN))
|
menu->addChild(new LLMenuItemCheckGL("RestrainedLove API", &rlvMenuToggleEnabled, NULL, &rlvMenuCheckEnabled, NULL));
|
||||||
menu->addChild(new LLMenuItemCheckGL("RestrainedLove API", &rlvMenuToggleEnabled, NULL, &rlvMenuCheckEnabled, NULL));
|
|
||||||
#endif // RLV_ADVANCED_TOGGLE_RLVA
|
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
|
|
||||||
if(gSavedSettings.getBOOL("QAMode"))
|
if(gSavedSettings.getBOOL("QAMode"))
|
||||||
@@ -1639,16 +1635,14 @@ void init_debug_rlva_menu(LLMenuGL* menu)
|
|||||||
menu->addChild(new LLMenuItemCheckGL("Enable Shared Wear", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_ENABLESHAREDWEAR));
|
menu->addChild(new LLMenuItemCheckGL("Enable Shared Wear", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_ENABLESHAREDWEAR));
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
|
|
||||||
#ifdef RLV_EXTENSION_HIDELOCKED
|
if ( (gSavedSettings.controlExists(RLV_SETTING_HIDELOCKEDLAYER)) &&
|
||||||
if ( (gSavedSettings.controlExists(RLV_SETTING_HIDELOCKEDLAYER)) &&
|
(gSavedSettings.controlExists(RLV_SETTING_HIDELOCKEDATTACH)) )
|
||||||
(gSavedSettings.controlExists(RLV_SETTING_HIDELOCKEDATTACH)) )
|
{
|
||||||
{
|
menu->addChild(new LLMenuItemCheckGL("Hide Locked Layers", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_HIDELOCKEDLAYER));
|
||||||
menu->addChild(new LLMenuItemCheckGL("Hide Locked Layers", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_HIDELOCKEDLAYER));
|
menu->addChild(new LLMenuItemCheckGL("Hide Locked Attachments", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_HIDELOCKEDATTACH));
|
||||||
menu->addChild(new LLMenuItemCheckGL("Hide Locked Attachments", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_HIDELOCKEDATTACH));
|
//sub_menu->addChild(new LLMenuItemToggleGL("Hide locked inventory", &rlv_handler_t::fHideLockedInventory));
|
||||||
//sub_menu->addChild(new LLMenuItemToggleGL("Hide locked inventory", &rlv_handler_t::fHideLockedInventory));
|
menu->addSeparator();
|
||||||
menu->addSeparator();
|
}
|
||||||
}
|
|
||||||
#endif // RLV_EXTENSION_HIDELOCKED
|
|
||||||
|
|
||||||
if (gSavedSettings.controlExists(RLV_SETTING_FORBIDGIVETORLV))
|
if (gSavedSettings.controlExists(RLV_SETTING_FORBIDGIVETORLV))
|
||||||
menu->addChild(new LLMenuItemCheckGL("Forbid Give to #RLV", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_FORBIDGIVETORLV));
|
menu->addChild(new LLMenuItemCheckGL("Forbid Give to #RLV", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_FORBIDGIVETORLV));
|
||||||
@@ -1656,11 +1650,8 @@ void init_debug_rlva_menu(LLMenuGL* menu)
|
|||||||
menu->addChild(new LLMenuItemCheckGL("Show Name Tags", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_SHOWNAMETAGS));
|
menu->addChild(new LLMenuItemCheckGL("Show Name Tags", menu_toggle_control, NULL, menu_check_control, (void*)RLV_SETTING_SHOWNAMETAGS));
|
||||||
menu->addSeparator();
|
menu->addSeparator();
|
||||||
|
|
||||||
#ifdef RLV_EXTENSION_FLOATER_RESTRICTIONS
|
menu->addChild(new LLMenuItemCheckGL("Restrictions...", &RlvFloaterBehaviours::toggle, NULL, &RlvFloaterBehaviours::visible, NULL));
|
||||||
// TODO-RLVa: figure out a way to tell if floater_rlv_behaviour.xml exists
|
menu->addChild(new LLMenuItemCheckGL("Locks...", &RlvFloaterLocks::toggle, NULL, &RlvFloaterLocks::visible, NULL));
|
||||||
menu->addChild(new LLMenuItemCheckGL("Restrictions...", &RlvFloaterBehaviours::toggle, NULL, &RlvFloaterBehaviours::visible, NULL));
|
|
||||||
menu->addChild(new LLMenuItemCheckGL("Locks...", &RlvFloaterLocks::toggle, NULL, &RlvFloaterLocks::visible, NULL));
|
|
||||||
#endif // RLV_EXTENSION_FLOATER_RESTRICTIONS
|
|
||||||
}
|
}
|
||||||
// [/RLVa:KB]
|
// [/RLVa:KB]
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#include "llagent.h"
|
#include "llagent.h"
|
||||||
#include "llagentui.h"
|
#include "llagentui.h"
|
||||||
#include "llavatarnamecache.h"
|
#include "llavatarnamecache.h"
|
||||||
|
#include "llinstantmessage.h"
|
||||||
#include "llnotificationsutil.h"
|
#include "llnotificationsutil.h"
|
||||||
#include "lluictrlfactory.h"
|
#include "lluictrlfactory.h"
|
||||||
#include "sgversion.h"
|
#include "sgversion.h"
|
||||||
@@ -37,44 +38,16 @@
|
|||||||
#include "../lscript/lscript_byteformat.h" //Need LSCRIPTRunTimePermissionBits and SCRIPT_PERMISSION_*
|
#include "../lscript/lscript_byteformat.h" //Need LSCRIPTRunTimePermissionBits and SCRIPT_PERMISSION_*
|
||||||
#include <boost/algorithm/string.hpp>
|
#include <boost/algorithm/string.hpp>
|
||||||
|
|
||||||
using namespace LLOldEvents;
|
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// RlvNotifications
|
// RlvNotifications
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifdef RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
|
||||||
// Checked: 2009-12-05 (RLVa-1.1.0h) | Added: RLVa-1.1.0h
|
|
||||||
/*void RlvNotifications::notifyBehaviour(ERlvBehaviour eBhvr, ERlvParamType eType)
|
|
||||||
{
|
|
||||||
const std::string& strMsg = RlvStrings::getBehaviourNotificationString(eBhvr, eType);
|
|
||||||
if (!strMsg.empty())
|
|
||||||
{
|
|
||||||
LLSD argsNotify;
|
|
||||||
argsNotify["MESSAGE"] = strMsg;
|
|
||||||
LLNotificationsUtil::add("SystemMessageTip", argsNotify);
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
#endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
|
||||||
|
|
||||||
// Checked: 2009-11-11 (RLVa-1.1.0a) | Added: RLVa-1.1.0a/
|
|
||||||
/*void RlvNotifications::notifyBlockedViewXXX(const char* pstrAssetType)
|
|
||||||
{
|
|
||||||
LLStringUtil::format_map_t argsMsg; std::string strMsg = RlvStrings::getString(RLV_STRING_BLOCKED_VIEWXXX);
|
|
||||||
argsMsg["[TYPE]"] = pstrAssetType;
|
|
||||||
LLStringUtil::format(strMsg, argsMsg);
|
|
||||||
|
|
||||||
LLSD argsNotify;
|
|
||||||
argsNotify["MESSAGE"] = strMsg;
|
|
||||||
LLNotificationsUtil::add("SystemMessageTip", argsNotify);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
// Checked: 2009-11-13 (RLVa-1.1.0b) | Modified: RLVa-1.1.0b
|
// Checked: 2009-11-13 (RLVa-1.1.0b) | Modified: RLVa-1.1.0b
|
||||||
/*
|
/*
|
||||||
void RlvNotifications::warnGiveToRLV()
|
void RlvNotifications::warnGiveToRLV()
|
||||||
{
|
{
|
||||||
if ( (gSavedSettings.getWarning(RLV_SETTING_FIRSTUSE_GIVETORLV)) && (RlvSettings::getForbidGiveToRLV()) )
|
if ( (gSavedSettings.getWarning(RLV_SETTING_FIRSTUSE_GIVETORLV)) && (RlvSettings::getForbidGiveToRLV()) )
|
||||||
LLNotifications::instance().add(RLV_SETTING_FIRSTUSE_GIVETORLV, LLSD(), LLSD(), &RlvUtil::onGiveToRLVConfirmation);
|
LLNotifications::instance().add(RLV_SETTING_FIRSTUSE_GIVETORLV, LLSD(), LLSD(), &RlvNotifications::onGiveToRLVConfirmation);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -188,10 +161,6 @@ bool RlvSettings::onChangedSettingBOOL(const LLSD& sdValue, bool* pfSetting)
|
|||||||
|
|
||||||
std::vector<std::string> RlvStrings::m_Anonyms;
|
std::vector<std::string> RlvStrings::m_Anonyms;
|
||||||
std::map<std::string, std::string> RlvStrings::m_StringMap;
|
std::map<std::string, std::string> RlvStrings::m_StringMap;
|
||||||
#ifdef RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
|
||||||
/*std::map<ERlvBehaviour, std::string> RlvStrings::m_BhvrAddMap;
|
|
||||||
std::map<ERlvBehaviour, std::string> RlvStrings::m_BhvrRemMap;*/
|
|
||||||
#endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
|
||||||
|
|
||||||
// Checked: 2010-03-09 (RLVa-1.2.0a) | Added: RLVa-1.1.0h
|
// Checked: 2010-03-09 (RLVa-1.2.0a) | Added: RLVa-1.1.0h
|
||||||
void RlvStrings::initClass()
|
void RlvStrings::initClass()
|
||||||
@@ -227,25 +196,6 @@ void RlvStrings::initClass()
|
|||||||
m_Anonyms.push_back(pAnonymNode->getTextContents());
|
m_Anonyms.push_back(pAnonymNode->getTextContents());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
|
||||||
/*else if (pNode->hasName("behaviour-notifications"))
|
|
||||||
{
|
|
||||||
std::string strBhvr, strType; ERlvBehaviour eBhvr;
|
|
||||||
for (LLXMLNode* pNotifyNode = pNode->getFirstChild(); pNotifyNode != NULL; pNotifyNode = pNotifyNode->getNextSibling())
|
|
||||||
{
|
|
||||||
if ( (!pNotifyNode->hasName("notification")) || (!pNotifyNode->getAttributeString("type", strType)) ||
|
|
||||||
(!pNotifyNode->getAttributeString("behaviour", strBhvr)) ||
|
|
||||||
((eBhvr = RlvCommand::getBehaviourFromString(strBhvr)) == RLV_BHVR_UNKNOWN) )
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ("add" == strType)
|
|
||||||
m_BhvrAddMap.insert(std::pair<ERlvBehaviour, std::string>(eBhvr, pNotifyNode->getTextContents()));
|
|
||||||
else if ("rem" == strType)
|
|
||||||
m_BhvrRemMap.insert(std::pair<ERlvBehaviour, std::string>(eBhvr, pNotifyNode->getTextContents()));
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
#endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( (m_StringMap.empty()) || (m_Anonyms.empty()) )
|
if ( (m_StringMap.empty()) || (m_Anonyms.empty()) )
|
||||||
@@ -270,29 +220,11 @@ const std::string& RlvStrings::getAnonym(const std::string& strName)
|
|||||||
return m_Anonyms[nHash % m_Anonyms.size()];
|
return m_Anonyms[nHash % m_Anonyms.size()];
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
|
||||||
// Checked: 2009-12-05 (RLVa-1.1.0h) | Added: RLVa-1.1.0h
|
|
||||||
/*const std::string& RlvStrings::getBehaviourNotificationString(ERlvBehaviour eBhvr, ERlvParamType eType)
|
|
||||||
{
|
|
||||||
if (RLV_TYPE_ADD == eType)
|
|
||||||
{
|
|
||||||
std::map<ERlvBehaviour, std::string>::const_iterator itString = m_BhvrAddMap.find(eBhvr);
|
|
||||||
return (itString != m_BhvrAddMap.end()) ? itString->second : LLStringUtil::null;
|
|
||||||
}
|
|
||||||
else if (RLV_TYPE_REMOVE == eType)
|
|
||||||
{
|
|
||||||
std::map<ERlvBehaviour, std::string>::const_iterator itString = m_BhvrRemMap.find(eBhvr);
|
|
||||||
return (itString != m_BhvrRemMap.end()) ? itString->second : LLStringUtil::null;
|
|
||||||
}
|
|
||||||
return LLStringUtil::null;
|
|
||||||
}*/
|
|
||||||
#endif // RLV_EXTENSION_NOTIFY_BEHAVIOUR
|
|
||||||
|
|
||||||
// Checked: 2009-11-11 (RLVa-1.1.0a) | Added: RLVa-1.1.0a
|
// Checked: 2009-11-11 (RLVa-1.1.0a) | Added: RLVa-1.1.0a
|
||||||
const std::string& RlvStrings::getString(const std::string& strStringName)
|
const std::string& RlvStrings::getString(const std::string& strStringName)
|
||||||
{
|
{
|
||||||
static const std::string strMissing = "(Missing RLVa string)";
|
static const std::string strMissing = "(Missing RLVa string)";
|
||||||
string_map_t::const_iterator itString = m_StringMap.find(strStringName);
|
std::map<std::string, std::string>::const_iterator itString = m_StringMap.find(strStringName);
|
||||||
return (itString != m_StringMap.end()) ? itString->second : strMissing;
|
return (itString != m_StringMap.end()) ? itString->second : strMissing;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -396,27 +328,21 @@ void RlvUtil::filterNames(std::string& strUTF8Text, bool fFilterLegacy)
|
|||||||
LLAvatarName avName;
|
LLAvatarName avName;
|
||||||
if (LLAvatarNameCache::get(idAgents[idxAgent], &avName))
|
if (LLAvatarNameCache::get(idAgents[idxAgent], &avName))
|
||||||
{
|
{
|
||||||
const std::string& strAnonym = RlvStrings::getAnonym(avName.mDisplayName);
|
const std::string& strDisplayName = avName.mDisplayName;
|
||||||
|
const std::string& strLegacyName = avName.getLegacyName();
|
||||||
// NOTE: if the legacy first and last name are empty we get a legacy name of " " which would replace all spaces in the string
|
const std::string& strAnonym = RlvStrings::getAnonym(avName);
|
||||||
std::string strLegacyName;
|
|
||||||
if ( (fFilterLegacy) && (!avName.mLegacyFirstName.empty()) &&
|
|
||||||
((!avName.mIsDisplayNameDefault) || (LLCacheName::getDefaultLastName() == avName.mLegacyLastName)) )
|
|
||||||
{
|
|
||||||
strLegacyName = avName.getLegacyName();
|
|
||||||
}
|
|
||||||
|
|
||||||
// If the display name is a subset of the legacy name we need to filter that first, otherwise it's the other way around
|
// If the display name is a subset of the legacy name we need to filter that first, otherwise it's the other way around
|
||||||
if (boost::icontains(strLegacyName, avName.mDisplayName))
|
if (boost::icontains(strLegacyName, strDisplayName))
|
||||||
{
|
{
|
||||||
if (!strLegacyName.empty())
|
if (fFilterLegacy)
|
||||||
boost::ireplace_all(strUTF8Text, strLegacyName, strAnonym);
|
boost::ireplace_all(strUTF8Text, strLegacyName, strAnonym);
|
||||||
boost::ireplace_all(strUTF8Text, avName.mDisplayName, strAnonym);
|
boost::ireplace_all(strUTF8Text, strDisplayName, strAnonym);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
boost::ireplace_all(strUTF8Text, avName.mDisplayName, strAnonym);
|
boost::ireplace_all(strUTF8Text, strDisplayName, strAnonym);
|
||||||
if (!strLegacyName.empty())
|
if (fFilterLegacy)
|
||||||
boost::ireplace_all(strUTF8Text, strLegacyName, strAnonym);
|
boost::ireplace_all(strUTF8Text, strLegacyName, strAnonym);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,6 +46,7 @@ class LLInventoryItem;
|
|||||||
class LLViewerInventoryCategory;
|
class LLViewerInventoryCategory;
|
||||||
class LLViewerInventoryItem;
|
class LLViewerInventoryItem;
|
||||||
class LLViewerJointAttachment;
|
class LLViewerJointAttachment;
|
||||||
|
class LLViewerWearable;
|
||||||
class LLWearable;
|
class LLWearable;
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -141,8 +142,7 @@ public:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
static std::vector<std::string> m_Anonyms;
|
static std::vector<std::string> m_Anonyms;
|
||||||
typedef std::map<std::string, std::string> string_map_t;
|
static std::map<std::string, std::string> m_StringMap;
|
||||||
static string_map_t m_StringMap;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
* Copyright (c) 2009-2011, Kitty Barnett
|
* Copyright (c) 2009-2011, Kitty Barnett
|
||||||
*
|
*
|
||||||
* The source code in this file is provided to you under the terms of the
|
* The source code in this file is provided to you under the terms of the
|
||||||
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
|
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. Terms of the GPL can be found in doc/GPL-license.txt
|
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
|
||||||
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
|
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge that
|
* By copying, modifying or distributing this software, you acknowledge that
|
||||||
* you have read and understood your obligations described above, and agree to
|
* you have read and understood your obligations described above, and agree to
|
||||||
@@ -21,20 +21,10 @@
|
|||||||
// Extensions
|
// Extensions
|
||||||
//
|
//
|
||||||
|
|
||||||
// Comment out if you don't want the Advanced / RLVa menu (may prevent enabling some extensions or experimental features - see below)
|
|
||||||
#define RLV_ADVANCED_MENU
|
|
||||||
// Comment out if you provide your own way to enable/disable RLVa
|
|
||||||
#define RLV_ADVANCED_TOGGLE_RLVA
|
|
||||||
|
|
||||||
// Provides access to "advanced" features through the RLVa debug menu
|
|
||||||
#define RLV_EXTENSION_FLOATER_RESTRICTIONS // Enables the Advanced / RLVa / Restrictions... floater
|
|
||||||
#define RLV_EXTENSION_HIDELOCKED // "Hide locked layers", "Hide locked attachments" and "Hide locked inventory"
|
|
||||||
|
|
||||||
// Extensions
|
// Extensions
|
||||||
#define RLV_EXTENSION_CMD_GETSETDEBUG_EX // Extends the debug variables accessible through @getdebug_xxx/@setdebug_xxx
|
#define RLV_EXTENSION_CMD_GETSETDEBUG_EX // Extends the debug variables accessible through @getdebug_xxx/@setdebug_xxx
|
||||||
#define RLV_EXTENSION_CMD_FINDFOLDERS // @findfolders:<option>=<channel> - @findfolder with multiple results
|
#define RLV_EXTENSION_CMD_FINDFOLDERS // @findfolders:<option>=<channel> - @findfolder with multiple results
|
||||||
#define RLV_EXTENSION_FORCEWEAR_GESTURES // @attach*/detach* commands also (de)activate gestures
|
#define RLV_EXTENSION_FORCEWEAR_GESTURES // @attach*/detach* commands also (de)activate gestures
|
||||||
#define RLV_EXTENSION_NOTIFY_BEHAVIOUR // Provides the option to show a customizable notification whenever a behaviour gets (un)set
|
|
||||||
#define RLV_EXTENSION_STARTLOCATION // Reenables "Start Location" at login if not @tploc=n or @unsit=n restricted at last logoff
|
#define RLV_EXTENSION_STARTLOCATION // Reenables "Start Location" at login if not @tploc=n or @unsit=n restricted at last logoff
|
||||||
#define RLV_EXPERIMENTAL // Enables/disables experimental features en masse
|
#define RLV_EXPERIMENTAL // Enables/disables experimental features en masse
|
||||||
#define RLV_EXPERIMENTAL_CMDS // Enables/disables experimental commands en masse
|
#define RLV_EXPERIMENTAL_CMDS // Enables/disables experimental commands en masse
|
||||||
@@ -49,7 +39,6 @@
|
|||||||
// Under development (don't include in public release)
|
// Under development (don't include in public release)
|
||||||
#if LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG
|
#if LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG
|
||||||
// #define RLV_EXPERIMENTAL_COMPOSITEFOLDERS
|
// #define RLV_EXPERIMENTAL_COMPOSITEFOLDERS
|
||||||
// #define RLV_EXPERIMENTAL_FIRSTUSE // Enables a number of "first use" popups
|
|
||||||
#endif // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG
|
#endif // LL_RELEASE_WITH_DEBUG_INFO || LL_DEBUG
|
||||||
#endif // RLV_EXPERIMENTAL
|
#endif // RLV_EXPERIMENTAL
|
||||||
|
|
||||||
@@ -112,7 +101,7 @@ const S32 RLVa_VERSION_BUILD = 0;
|
|||||||
#define RLV_ROOT_FOLDER "#RLV"
|
#define RLV_ROOT_FOLDER "#RLV"
|
||||||
#define RLV_CMD_PREFIX '@'
|
#define RLV_CMD_PREFIX '@'
|
||||||
#define RLV_PUTINV_PREFIX "#RLV/~"
|
#define RLV_PUTINV_PREFIX "#RLV/~"
|
||||||
#define RLV_SETROT_OFFSET F_PI_BY_TWO // @setrot is off by 90° with the rest of SL
|
#define RLV_SETROT_OFFSET F_PI_BY_TWO // @setrot is off by 90<EFBFBD> with the rest of SL
|
||||||
|
|
||||||
#define RLV_FOLDER_FLAG_NOSTRIP "nostrip"
|
#define RLV_FOLDER_FLAG_NOSTRIP "nostrip"
|
||||||
#define RLV_FOLDER_PREFIX_HIDDEN '.'
|
#define RLV_FOLDER_PREFIX_HIDDEN '.'
|
||||||
@@ -199,17 +188,17 @@ enum ERlvBehaviour {
|
|||||||
RLV_BHVR_ATTACHOVER, // "attachover"
|
RLV_BHVR_ATTACHOVER, // "attachover"
|
||||||
RLV_BHVR_ATTACHTHIS, // "attachthis"
|
RLV_BHVR_ATTACHTHIS, // "attachthis"
|
||||||
RLV_BHVR_ATTACHTHISOVER, // "attachthisover"
|
RLV_BHVR_ATTACHTHISOVER, // "attachthisover"
|
||||||
RLV_BHVR_ATTACHTHISEXCEPT, // "attachthisexcept"
|
RLV_BHVR_ATTACHTHISEXCEPT, // "attachthis_except"
|
||||||
RLV_BHVR_DETACHTHIS, // "detachthis"
|
RLV_BHVR_DETACHTHIS, // "detachthis"
|
||||||
RLV_BHVR_DETACHTHISEXCEPT, // "detachthisexcept"
|
RLV_BHVR_DETACHTHISEXCEPT, // "detachthis_except"
|
||||||
RLV_BHVR_ATTACHALL, // "attachall"
|
RLV_BHVR_ATTACHALL, // "attachall"
|
||||||
RLV_BHVR_ATTACHALLOVER, // "attachallover"
|
RLV_BHVR_ATTACHALLOVER, // "attachallover"
|
||||||
RLV_BHVR_DETACHALL, // "detachall"
|
RLV_BHVR_DETACHALL, // "detachall"
|
||||||
RLV_BHVR_ATTACHALLTHIS, // "attachallthis"
|
RLV_BHVR_ATTACHALLTHIS, // "attachallthis"
|
||||||
RLV_BHVR_ATTACHALLTHISEXCEPT, // "attachallthisexcept"
|
RLV_BHVR_ATTACHALLTHISEXCEPT, // "attachallthis_except"
|
||||||
RLV_BHVR_ATTACHALLTHISOVER, // "attachallthisover"
|
RLV_BHVR_ATTACHALLTHISOVER, // "attachallthisover"
|
||||||
RLV_BHVR_DETACHALLTHIS, // "detachallthis"
|
RLV_BHVR_DETACHALLTHIS, // "detachallthis"
|
||||||
RLV_BHVR_DETACHALLTHISEXCEPT, // "detachallthisexcept"
|
RLV_BHVR_DETACHALLTHISEXCEPT, // "detachallthis_except"
|
||||||
RLV_BHVR_ADJUSTHEIGHT, // "adjustheight"
|
RLV_BHVR_ADJUSTHEIGHT, // "adjustheight"
|
||||||
RLV_BHVR_TPTO, // "tpto"
|
RLV_BHVR_TPTO, // "tpto"
|
||||||
RLV_BHVR_VERSION, // "version"
|
RLV_BHVR_VERSION, // "version"
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Copyright (c) 2009-2010, Kitty Barnett
|
* Copyright (c) 2009-2011, Kitty Barnett
|
||||||
*
|
*
|
||||||
* The source code in this file is provided to you under the terms of the
|
* The source code in this file is provided to you under the terms of the
|
||||||
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
|
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. Terms of the GPL can be found in doc/GPL-license.txt
|
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
|
||||||
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
|
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge that
|
* By copying, modifying or distributing this software, you acknowledge that
|
||||||
* you have read and understood your obligations described above, and agree to
|
* you have read and understood your obligations described above, and agree to
|
||||||
@@ -181,7 +181,6 @@ RlvWindLight::RlvWindLight()
|
|||||||
m_ControlLookupMap.insert(std::pair<std::string, RlvWindLightControl>("distancemultiplier", RlvWindLightControl(&pWLParamMgr->mDistanceMult)));
|
m_ControlLookupMap.insert(std::pair<std::string, RlvWindLightControl>("distancemultiplier", RlvWindLightControl(&pWLParamMgr->mDistanceMult)));
|
||||||
m_ControlLookupMap.insert(std::pair<std::string, RlvWindLightControl>("maxaltitude", RlvWindLightControl(&pWLParamMgr->mMaxAlt)));
|
m_ControlLookupMap.insert(std::pair<std::string, RlvWindLightControl>("maxaltitude", RlvWindLightControl(&pWLParamMgr->mMaxAlt)));
|
||||||
m_ControlLookupMap.insert(std::pair<std::string, RlvWindLightControl>("scenegamma", RlvWindLightControl(&pWLParamMgr->mWLGamma)));
|
m_ControlLookupMap.insert(std::pair<std::string, RlvWindLightControl>("scenegamma", RlvWindLightControl(&pWLParamMgr->mWLGamma)));
|
||||||
// TYPE_COLOR_R
|
|
||||||
m_ControlLookupMap.insert(std::pair<std::string, RlvWindLightControl>("hazedensity", RlvWindLightControl(&pWLParamMgr->mHazeDensity)));
|
m_ControlLookupMap.insert(std::pair<std::string, RlvWindLightControl>("hazedensity", RlvWindLightControl(&pWLParamMgr->mHazeDensity)));
|
||||||
m_ControlLookupMap.insert(std::pair<std::string, RlvWindLightControl>("hazehorizon", RlvWindLightControl(&pWLParamMgr->mHazeHorizon)));
|
m_ControlLookupMap.insert(std::pair<std::string, RlvWindLightControl>("hazehorizon", RlvWindLightControl(&pWLParamMgr->mHazeHorizon)));
|
||||||
// TYPE_COLOR
|
// TYPE_COLOR
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* Copyright (c) 2009-2010, Kitty Barnett
|
* Copyright (c) 2009-2011, Kitty Barnett
|
||||||
*
|
*
|
||||||
* The source code in this file is provided to you under the terms of the
|
* The source code in this file is provided to you under the terms of the
|
||||||
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
|
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. Terms of the GPL can be found in doc/GPL-license.txt
|
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
|
||||||
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
|
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge that
|
* By copying, modifying or distributing this software, you acknowledge that
|
||||||
* you have read and understood your obligations described above, and agree to
|
* you have read and understood your obligations described above, and agree to
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
* Copyright (c) 2009-2011, Kitty Barnett
|
* Copyright (c) 2009-2011, Kitty Barnett
|
||||||
*
|
*
|
||||||
* The source code in this file is provided to you under the terms of the
|
* The source code in this file is provided to you under the terms of the
|
||||||
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
|
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. Terms of the GPL can be found in doc/GPL-license.txt
|
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
|
||||||
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
|
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge that
|
* By copying, modifying or distributing this software, you acknowledge that
|
||||||
* you have read and understood your obligations described above, and agree to
|
* you have read and understood your obligations described above, and agree to
|
||||||
@@ -660,16 +660,15 @@ bool RlvHandler::canSit(LLViewerObject* pObj, const LLVector3& posOffset /*= LLV
|
|||||||
// - not prevented from sitting
|
// - not prevented from sitting
|
||||||
// - not prevented from standing up or not currently sitting
|
// - not prevented from standing up or not currently sitting
|
||||||
// - not standtp restricted or not currently sitting (if the user is sitting and tried to sit elsewhere the tp would just kick in)
|
// - not standtp restricted or not currently sitting (if the user is sitting and tried to sit elsewhere the tp would just kick in)
|
||||||
// - [regular sit] not @sittp=n or @fartouch=n restricted or if they clicked on a point within 1.5m of the avie's current position
|
// - not a regular sit (i.e. due to @sit:<uuid>=force)
|
||||||
// - [force sit] not @sittp=n restricted by a *different* object than the one that issued the command or the object is within 1.5m
|
// - not @sittp=n or @fartouch=n restricted or if they clicked on a point within 1.5m of the avie's current position
|
||||||
return
|
return
|
||||||
( (pObj) && (LL_PCODE_VOLUME == pObj->getPCode()) ) &&
|
( (pObj) && (LL_PCODE_VOLUME == pObj->getPCode()) ) &&
|
||||||
(!hasBehaviour(RLV_BHVR_SIT)) &&
|
(!hasBehaviour(RLV_BHVR_SIT)) &&
|
||||||
( ((!hasBehaviour(RLV_BHVR_UNSIT)) && (!hasBehaviour(RLV_BHVR_STANDTP))) ||
|
( ((!hasBehaviour(RLV_BHVR_UNSIT)) && (!hasBehaviour(RLV_BHVR_STANDTP))) ||
|
||||||
((isAgentAvatarValid()) && (!gAgentAvatarp->isSitting())) ) &&
|
((isAgentAvatarValid()) && (!gAgentAvatarp->isSitting())) ) &&
|
||||||
( ((NULL == getCurrentCommand() || (RLV_BHVR_SIT != getCurrentCommand()->getBehaviourType()))
|
( ( (NULL != getCurrentCommand()) && (RLV_BHVR_SIT == getCurrentCommand()->getBehaviourType()) ) ||
|
||||||
? ((!hasBehaviour(RLV_BHVR_SITTP)) && (!hasBehaviour(RLV_BHVR_FARTOUCH))) // [regular sit]
|
( (!hasBehaviour(RLV_BHVR_SITTP)) && (!hasBehaviour(RLV_BHVR_FARTOUCH)) ) ||
|
||||||
: (!hasBehaviourExcept(RLV_BHVR_SITTP, getCurrentObject()))) || // [force sit]
|
|
||||||
(dist_vec_squared(gAgent.getPositionGlobal(), pObj->getPositionGlobal() + LLVector3d(posOffset)) < 1.5f * 1.5f) );
|
(dist_vec_squared(gAgent.getPositionGlobal(), pObj->getPositionGlobal() + LLVector3d(posOffset)) < 1.5f * 1.5f) );
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -934,7 +933,7 @@ bool RlvHandler::redirectChatOrEmote(const std::string& strUTF8Text) const
|
|||||||
case LLAssetType::AT_BODYPART:
|
case LLAssetType::AT_BODYPART:
|
||||||
case LLAssetType::AT_CLOTHING:
|
case LLAssetType::AT_CLOTHING:
|
||||||
{
|
{
|
||||||
LLViewerWearable* pWearable = gAgent.getWearableFromWearableItem(pItem->getUUID());
|
LLWearable* pWearable = gAgent.getWearableFromWearableItem(pItem->getUUID());
|
||||||
if ( (pWearable) && (!isRemovable(pWearable->getType())) )
|
if ( (pWearable) && (!isRemovable(pWearable->getType())) )
|
||||||
return false; // If one wearable in the folder is non-removeable then the entire folder should be
|
return false; // If one wearable in the folder is non-removeable then the entire folder should be
|
||||||
}
|
}
|
||||||
@@ -1055,9 +1054,15 @@ BOOL RlvHandler::setEnabled(BOOL fEnable)
|
|||||||
|
|
||||||
// Set up RlvUIEnabler
|
// Set up RlvUIEnabler
|
||||||
RlvUIEnabler::getInstance();
|
RlvUIEnabler::getInstance();
|
||||||
|
|
||||||
|
/* Singu Note: Off!
|
||||||
|
// Reset to show assertions if the viewer version changed
|
||||||
|
if (gSavedSettings.getString("LastRunVersion") != gLastRunVersion)
|
||||||
|
gSavedSettings.setBOOL("RLVaShowAssertionFailures", TRUE);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_fEnabled; // Return enabled/disabled state
|
return m_fEnabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL RlvHandler::canDisable()
|
BOOL RlvHandler::canDisable()
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
* Copyright (c) 2009-2011, Kitty Barnett
|
* Copyright (c) 2009-2011, Kitty Barnett
|
||||||
*
|
*
|
||||||
* The source code in this file is provided to you under the terms of the
|
* The source code in this file is provided to you under the terms of the
|
||||||
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
|
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. Terms of the GPL can be found in doc/GPL-license.txt
|
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
|
||||||
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
|
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge that
|
* By copying, modifying or distributing this software, you acknowledge that
|
||||||
* you have read and understood your obligations described above, and agree to
|
* you have read and understood your obligations described above, and agree to
|
||||||
@@ -34,6 +34,9 @@ public:
|
|||||||
|
|
||||||
// --------------------------------
|
// --------------------------------
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Rule checking functions
|
||||||
|
*/
|
||||||
// NOTE: - to check @detach=n -> (see RlvAttachmentLocks)
|
// NOTE: - to check @detach=n -> (see RlvAttachmentLocks)
|
||||||
// - to check @addattach=n -> (see RlvAttachmentLocks)
|
// - to check @addattach=n -> (see RlvAttachmentLocks)
|
||||||
// - to check @remattach=n -> (see RlvAttachmentLocks)
|
// - to check @remattach=n -> (see RlvAttachmentLocks)
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
* Copyright (c) 2009-2011, Kitty Barnett
|
* Copyright (c) 2009-2011, Kitty Barnett
|
||||||
*
|
*
|
||||||
* The source code in this file is provided to you under the terms of the
|
* The source code in this file is provided to you under the terms of the
|
||||||
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
|
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. Terms of the GPL can be found in doc/GPL-license.txt
|
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
|
||||||
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
|
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge that
|
* By copying, modifying or distributing this software, you acknowledge that
|
||||||
* you have read and understood your obligations described above, and agree to
|
* you have read and understood your obligations described above, and agree to
|
||||||
@@ -1005,6 +1005,41 @@ void RlvForceWear::done()
|
|||||||
RLV_ASSERT( (m_addWearables.empty()) && (m_addAttachments.empty()) && (m_addGestures.empty()) );
|
RLV_ASSERT( (m_addWearables.empty()) && (m_addAttachments.empty()) && (m_addGestures.empty()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Checked: 2010-02-17 (RLVa-1.1.0o) | Modified: RLVa-1.1.0o
|
||||||
|
/*
|
||||||
|
void RlvForceWear::onWearableArrived(LLWearable* pWearable, void* pParam)
|
||||||
|
{
|
||||||
|
#ifdef RLV_EXPERIMENTAL_COMPOSITEFOLDERS
|
||||||
|
// If this wearable will end up replacing a currently worn one that belongs to a composite folder then we need to detach the composite
|
||||||
|
LLViewerInventoryCategory* pFolder = NULL;
|
||||||
|
if ( (RlvSettings::getEnableComposites()) && (pWearable) && (gAgent.getWearable(pWearable->getType())) )
|
||||||
|
{
|
||||||
|
// If we're just rewearing the same item we're already wearing then we're not replacing a composite folder
|
||||||
|
LLWearableHoldingPattern* pWearData = (LLWearableHoldingPattern*)pParam; LLUUID idItem;
|
||||||
|
for (LLWearableHoldingPattern::found_list_t::const_iterator itWearable = pWearData->mFoundList.begin();
|
||||||
|
itWearable != pWearData->mFoundList.end(); ++itWearable)
|
||||||
|
{
|
||||||
|
LLFoundData* pFound = *itWearable;
|
||||||
|
if (pWearable->getID() == pFound->mAssetID)
|
||||||
|
{
|
||||||
|
idItem = pFound->mItemID;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ( (idItem.notNull()) && (idItem != gAgent.getWearableItem(pWearable->getType())) &&
|
||||||
|
(gRlvHandler.getCompositeInfo(gAgent.getWearableItem(pWearable->getType()), NULL, &pFolder)) )
|
||||||
|
{
|
||||||
|
RlvForceWear rlvWear;
|
||||||
|
rlvWear.forceFolder(pFolder, ACTION_DETACH, FLAG_DEFAULT);
|
||||||
|
rlvWear.done();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif // RLV_EXPERIMENTAL_COMPOSITEFOLDERS
|
||||||
|
|
||||||
|
wear_inventory_category_on_avatar_loop(pWearable, pParam);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// RlvBehaviourNotifyHandler
|
// RlvBehaviourNotifyHandler
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
* Copyright (c) 2009-2011, Kitty Barnett
|
* Copyright (c) 2009-2011, Kitty Barnett
|
||||||
*
|
*
|
||||||
* The source code in this file is provided to you under the terms of the
|
* The source code in this file is provided to you under the terms of the
|
||||||
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
|
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. Terms of the GPL can be found in doc/GPL-license.txt
|
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
|
||||||
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
|
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge that
|
* By copying, modifying or distributing this software, you acknowledge that
|
||||||
* you have read and understood your obligations described above, and agree to
|
* you have read and understood your obligations described above, and agree to
|
||||||
@@ -26,8 +26,6 @@
|
|||||||
#include "rlvdefines.h"
|
#include "rlvdefines.h"
|
||||||
#include "rlvcommon.h"
|
#include "rlvcommon.h"
|
||||||
|
|
||||||
class LLViewerWearable;
|
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// RlvCommand
|
// RlvCommand
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
* Copyright (c) 2009-2011, Kitty Barnett
|
* Copyright (c) 2009-2011, Kitty Barnett
|
||||||
*
|
*
|
||||||
* The source code in this file is provided to you under the terms of the
|
* The source code in this file is provided to you under the terms of the
|
||||||
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
|
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. Terms of the GPL can be found in doc/GPL-license.txt
|
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
|
||||||
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
|
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge that
|
* By copying, modifying or distributing this software, you acknowledge that
|
||||||
* you have read and understood your obligations described above, and agree to
|
* you have read and understood your obligations described above, and agree to
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
* Copyright (c) 2009-2011, Kitty Barnett
|
* Copyright (c) 2009-2011, Kitty Barnett
|
||||||
*
|
*
|
||||||
* The source code in this file is provided to you under the terms of the
|
* The source code in this file is provided to you under the terms of the
|
||||||
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
|
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. Terms of the GPL can be found in doc/GPL-license.txt
|
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
|
||||||
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
|
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge that
|
* By copying, modifying or distributing this software, you acknowledge that
|
||||||
* you have read and understood your obligations described above, and agree to
|
* you have read and understood your obligations described above, and agree to
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
* Copyright (c) 2009-2011, Kitty Barnett
|
* Copyright (c) 2009-2011, Kitty Barnett
|
||||||
*
|
*
|
||||||
* The source code in this file is provided to you under the terms of the
|
* The source code in this file is provided to you under the terms of the
|
||||||
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
|
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. Terms of the GPL can be found in doc/GPL-license.txt
|
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
|
||||||
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
|
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge that
|
* By copying, modifying or distributing this software, you acknowledge that
|
||||||
* you have read and understood your obligations described above, and agree to
|
* you have read and understood your obligations described above, and agree to
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
|
|
||||||
std::map<std::string, S32> RlvAttachPtLookup::m_AttachPtLookupMap;
|
std::map<std::string, S32> RlvAttachPtLookup::m_AttachPtLookupMap;
|
||||||
|
|
||||||
// Checked: 2010-03-02 (RLVa-1.1.3a) | Modified: RLVa-1.2.0a
|
// Checked: 2010-03-02 (RLVa-1.2.0a) | Modified: RLVa-1.2.0a
|
||||||
void RlvAttachPtLookup::initLookupTable()
|
void RlvAttachPtLookup::initLookupTable()
|
||||||
{
|
{
|
||||||
static bool fInitialized = false;
|
static bool fInitialized = false;
|
||||||
@@ -64,7 +64,7 @@ void RlvAttachPtLookup::initLookupTable()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checked: 2010-03-03 (RLVa-1.1.3a) | Added: RLVa-0.2.2a
|
// Checked: 2010-03-03 (RLVa-1.2.0a) | Added: RLVa-0.2.2a
|
||||||
S32 RlvAttachPtLookup::getAttachPointIndex(const LLViewerJointAttachment* pAttachPt)
|
S32 RlvAttachPtLookup::getAttachPointIndex(const LLViewerJointAttachment* pAttachPt)
|
||||||
{
|
{
|
||||||
if (isAgentAvatarValid())
|
if (isAgentAvatarValid())
|
||||||
@@ -439,7 +439,7 @@ void RlvAttachmentLocks::removeAttachmentPointLock(S32 idxAttachPt, const LLUUID
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checked: 2010-08-22 (RLVa-1.1.3a) | Modified: RLVa-1.2.1a
|
// Checked: 2010-08-22 (RLVa-1.2.1a) | Modified: RLVa-1.2.1a
|
||||||
void RlvAttachmentLocks::updateLockedHUD()
|
void RlvAttachmentLocks::updateLockedHUD()
|
||||||
{
|
{
|
||||||
if (!isAgentAvatarValid())
|
if (!isAgentAvatarValid())
|
||||||
@@ -500,7 +500,7 @@ bool RlvAttachmentLockWatchdog::RlvWearInfo::isAddLockedAttachPt(S32 idxAttachPt
|
|||||||
return (attachPts.find(idxAttachPt) != attachPts.end());
|
return (attachPts.find(idxAttachPt) != attachPts.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checked: 2010-09-23 (RLVa-1.1.3b) | Added: RLVa-1.2.1d
|
// Checked: 2010-09-23 (RLVa-1.2.1d) | Added: RLVa-1.2.1d
|
||||||
void RlvAttachmentLockWatchdog::RlvWearInfo::dumpInstance() const
|
void RlvAttachmentLockWatchdog::RlvWearInfo::dumpInstance() const
|
||||||
{
|
{
|
||||||
const LLViewerInventoryItem* pItem = gInventory.getItem(idItem);
|
const LLViewerInventoryItem* pItem = gInventory.getItem(idItem);
|
||||||
@@ -635,7 +635,7 @@ void RlvAttachmentLockWatchdog::detach(S32 idxAttachPt, const uuid_vec_t& idsAtt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checked: 2010-09-23 (RLVa-1.1.3a) | Modified: RLVa-1.2.1d
|
// Checked: 2010-09-23 (RLVa-1.2.1d) | Modified: RLVa-1.2.1d
|
||||||
void RlvAttachmentLockWatchdog::onAttach(const LLViewerObject* pAttachObj, const LLViewerJointAttachment* pAttachPt)
|
void RlvAttachmentLockWatchdog::onAttach(const LLViewerObject* pAttachObj, const LLViewerJointAttachment* pAttachPt)
|
||||||
{
|
{
|
||||||
S32 idxAttachPt = RlvAttachPtLookup::getAttachPointIndex(pAttachObj);
|
S32 idxAttachPt = RlvAttachPtLookup::getAttachPointIndex(pAttachObj);
|
||||||
@@ -742,7 +742,7 @@ void RlvAttachmentLockWatchdog::onAttach(const LLViewerObject* pAttachObj, const
|
|||||||
RlvBehaviourNotifyHandler::onAttach(pAttachPt, fAttachAllowed);
|
RlvBehaviourNotifyHandler::onAttach(pAttachPt, fAttachAllowed);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checked: 2010-07-28 (RLVa-1.1.3a) | Modified: RLVa-1.2.0i
|
// Checked: 2010-07-28 (RLVa-1.2.0i) | Modified: RLVa-1.2.0i
|
||||||
void RlvAttachmentLockWatchdog::onDetach(const LLViewerObject* pAttachObj, const LLViewerJointAttachment* pAttachPt)
|
void RlvAttachmentLockWatchdog::onDetach(const LLViewerObject* pAttachObj, const LLViewerJointAttachment* pAttachPt)
|
||||||
{
|
{
|
||||||
S32 idxAttachPt = RlvAttachPtLookup::getAttachPointIndex(pAttachPt);
|
S32 idxAttachPt = RlvAttachPtLookup::getAttachPointIndex(pAttachPt);
|
||||||
@@ -852,7 +852,7 @@ BOOL RlvAttachmentLockWatchdog::onTimer()
|
|||||||
return ( (m_PendingAttach.empty()) && (m_PendingDetach.empty()) && (m_PendingWear.empty()) );
|
return ( (m_PendingAttach.empty()) && (m_PendingDetach.empty()) && (m_PendingWear.empty()) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checked: 2010-07-28 (RLVa-1.1.3a) | Modified: RLVa-1.2.0i
|
// Checked: 2010-07-28 (RLVa-1.2.0i) | Modified: RLVa-1.2.0i
|
||||||
void RlvAttachmentLockWatchdog::onWearAttachment(const LLUUID& idItem, ERlvWearMask eWearAction)
|
void RlvAttachmentLockWatchdog::onWearAttachment(const LLUUID& idItem, ERlvWearMask eWearAction)
|
||||||
{
|
{
|
||||||
// We only need to keep track of user wears if there's actually anything locked
|
// We only need to keep track of user wears if there's actually anything locked
|
||||||
@@ -931,7 +931,7 @@ void RlvWearableLocks::addWearableTypeLock(LLWearableType::EType eType, const LL
|
|||||||
m_WearableTypeAdd.insert(std::pair<LLWearableType::EType, LLUUID>(eType, idRlvObj));
|
m_WearableTypeAdd.insert(std::pair<LLWearableType::EType, LLUUID>(eType, idRlvObj));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checked: 2010-03-19 (RLVa-1.1.3b) | Added: RLVa-1.2.0a
|
// Checked: 2010-03-19 (RLVa-1.2.0c) | Added: RLVa-1.2.0a
|
||||||
bool RlvWearableLocks::canRemove(LLWearableType::EType eType) const
|
bool RlvWearableLocks::canRemove(LLWearableType::EType eType) const
|
||||||
{
|
{
|
||||||
// NOTE: we return TRUE if the wearable type has at least one wearable that can be removed by the user
|
// NOTE: we return TRUE if the wearable type has at least one wearable that can be removed by the user
|
||||||
@@ -1162,7 +1162,7 @@ bool RlvFolderLocks::getLockedFolders(const folderlock_source_t& lockSource, LLI
|
|||||||
return cntFolders != lockFolders.count();
|
return cntFolders != lockFolders.count();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checked: 2011-03-27 (RLVa-1.3.0g) | Added: RLVa-1.3.0g
|
// Checked: 2011-11-26 (RLVa-1.5.4a) | Modified: RLVa-1.5.4a
|
||||||
bool RlvFolderLocks::getLockedItems(const LLUUID& idFolder, LLInventoryModel::item_array_t& lockItems) const
|
bool RlvFolderLocks::getLockedItems(const LLUUID& idFolder, LLInventoryModel::item_array_t& lockItems) const
|
||||||
{
|
{
|
||||||
S32 cntItems = lockItems.count();
|
S32 cntItems = lockItems.count();
|
||||||
|
|||||||
@@ -3,10 +3,10 @@
|
|||||||
* Copyright (c) 2009-2011, Kitty Barnett
|
* Copyright (c) 2009-2011, Kitty Barnett
|
||||||
*
|
*
|
||||||
* The source code in this file is provided to you under the terms of the
|
* The source code in this file is provided to you under the terms of the
|
||||||
* GNU General Public License, version 2.0, but WITHOUT ANY WARRANTY;
|
* GNU Lesser General Public License, version 2.1, but WITHOUT ANY WARRANTY;
|
||||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
* PARTICULAR PURPOSE. Terms of the GPL can be found in doc/GPL-license.txt
|
* PARTICULAR PURPOSE. Terms of the LGPL can be found in doc/LGPL-licence.txt
|
||||||
* in this distribution, or online at http://www.gnu.org/licenses/gpl-2.0.txt
|
* in this distribution, or online at http://www.gnu.org/licenses/lgpl-2.1.txt
|
||||||
*
|
*
|
||||||
* By copying, modifying or distributing this software, you acknowledge that
|
* By copying, modifying or distributing this software, you acknowledge that
|
||||||
* you have read and understood your obligations described above, and agree to
|
* you have read and understood your obligations described above, and agree to
|
||||||
@@ -298,7 +298,7 @@ public:
|
|||||||
// Specifies options for the folder lock
|
// Specifies options for the folder lock
|
||||||
enum ELockPermission { PERM_ALLOW = 0x1, PERM_DENY = 0x2, PERM_MASK_ANY = 0x3 };
|
enum ELockPermission { PERM_ALLOW = 0x1, PERM_DENY = 0x2, PERM_MASK_ANY = 0x3 };
|
||||||
enum ELockScope { SCOPE_NODE, SCOPE_SUBTREE } ;
|
enum ELockScope { SCOPE_NODE, SCOPE_SUBTREE } ;
|
||||||
protected:
|
|
||||||
struct folderlock_descr_t
|
struct folderlock_descr_t
|
||||||
{
|
{
|
||||||
LLUUID idRlvObj;
|
LLUUID idRlvObj;
|
||||||
@@ -394,13 +394,13 @@ inline LLViewerJointAttachment* RlvAttachPtLookup::getAttachPoint(S32 idxAttachP
|
|||||||
return (isAgentAvatarValid()) ? get_if_there(gAgentAvatarp->mAttachmentPoints, idxAttachPt, (LLViewerJointAttachment*)NULL) : NULL;
|
return (isAgentAvatarValid()) ? get_if_there(gAgentAvatarp->mAttachmentPoints, idxAttachPt, (LLViewerJointAttachment*)NULL) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checked: 2010-03-03 (RLVa-1.1.3a) | Modified: RLVa-0.2.0d
|
// Checked: 2010-03-03 (RLVa-1.2.0a) | Modified: RLVa-0.2.0d
|
||||||
inline LLViewerJointAttachment* RlvAttachPtLookup::getAttachPoint(const std::string& strText)
|
inline LLViewerJointAttachment* RlvAttachPtLookup::getAttachPoint(const std::string& strText)
|
||||||
{
|
{
|
||||||
return (isAgentAvatarValid()) ? get_if_there(gAgentAvatarp->mAttachmentPoints, getAttachPointIndex(strText), (LLViewerJointAttachment*)NULL) : NULL;
|
return (isAgentAvatarValid()) ? get_if_there(gAgentAvatarp->mAttachmentPoints, getAttachPointIndex(strText), (LLViewerJointAttachment*)NULL) : NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Checked: 2010-03-03 (RLVa-1.1.3a) | Modified: RLVa-1.0.1b
|
// Checked: 2010-03-03 (RLVa-1.2.0a) | Modified: RLVa-1.0.1b
|
||||||
inline LLViewerJointAttachment* RlvAttachPtLookup::getAttachPoint(const LLInventoryItem* pItem)
|
inline LLViewerJointAttachment* RlvAttachPtLookup::getAttachPoint(const LLInventoryItem* pItem)
|
||||||
{
|
{
|
||||||
return (isAgentAvatarValid()) ? get_if_there(gAgentAvatarp->mAttachmentPoints, getAttachPointIndex(pItem), (LLViewerJointAttachment*)NULL) : NULL;
|
return (isAgentAvatarValid()) ? get_if_there(gAgentAvatarp->mAttachmentPoints, getAttachPointIndex(pItem), (LLViewerJointAttachment*)NULL) : NULL;
|
||||||
@@ -425,11 +425,11 @@ inline S32 RlvAttachPtLookup::getAttachPointIndex(const LLViewerObject* pObj)
|
|||||||
// RlvAttachmentLocks inlined member functions
|
// RlvAttachmentLocks inlined member functions
|
||||||
//
|
//
|
||||||
|
|
||||||
// Checked: 2011-03-27 (RLVa-1.3.0g) | Modified: RLVa-1.3.0g
|
// Checked: 2011-05-22 (RLVa-1.3.1b) | Modified: RLVa-1.3.1b
|
||||||
inline ERlvWearMask RlvAttachmentLocks::canAttach(const LLInventoryItem* pItem, LLViewerJointAttachment** ppAttachPtOut /*=NULL*/) const
|
inline ERlvWearMask RlvAttachmentLocks::canAttach(const LLInventoryItem* pItem, LLViewerJointAttachment** ppAttachPtOut /*=NULL*/) const
|
||||||
{
|
{
|
||||||
// The specified item can be attached if:
|
// The specified item can be attached if:
|
||||||
// - it doesn't specify an attachment point
|
// - it doesn't specify an attachment point and there is at least one attachment point that can be attached to
|
||||||
// - the attachment point it specifies can be attached to
|
// - the attachment point it specifies can be attached to
|
||||||
LLViewerJointAttachment* pAttachPt = RlvAttachPtLookup::getAttachPoint(pItem);
|
LLViewerJointAttachment* pAttachPt = RlvAttachPtLookup::getAttachPoint(pItem);
|
||||||
if (ppAttachPtOut)
|
if (ppAttachPtOut)
|
||||||
@@ -628,13 +628,12 @@ inline bool RlvFolderLocks::canRemoveFolder(const LLUUID& idFolder) const
|
|||||||
// Checked: 2011-03-29 (RLVa-1.3.0g) | Added: RLVa-1.3.0g
|
// Checked: 2011-03-29 (RLVa-1.3.0g) | Added: RLVa-1.3.0g
|
||||||
inline bool RlvFolderLocks::canRenameFolder(const LLUUID& idFolder) const
|
inline bool RlvFolderLocks::canRenameFolder(const LLUUID& idFolder) const
|
||||||
{
|
{
|
||||||
/* Block renaming a folder if:
|
// Block renaming a folder if:
|
||||||
// - the folder (or one of its descendents) is explicitly locked by:
|
// - the folder (or one of its descendents) is explicitly locked by:
|
||||||
// -> a "shared path" => renaming the folder would change the shared path and hence invalidate the lock
|
// -> a "shared path" => renaming the folder would change the shared path and hence invalidate the lock
|
||||||
// -> an attachment point \
|
// -> an attachment point -|
|
||||||
// -> an attachment |--> renaming the folder to a "dot" (=invisible) folder would invalidate the lock
|
// -> an attachment |--> renaming the folder to a "dot" (=invisible) folder would invalidate the lock
|
||||||
// -> a wearable type /
|
// -> a wearable type -|
|
||||||
*/
|
|
||||||
return !hasLockedFolderDescendent(idFolder, ST_SHAREDPATH | ST_ATTACHMENT | ST_ATTACHMENTPOINT | ST_WEARABLETYPE, PERM_MASK_ANY, RLV_LOCK_ANY, true);
|
return !hasLockedFolderDescendent(idFolder, ST_SHAREDPATH | ST_ATTACHMENT | ST_ATTACHMENTPOINT | ST_WEARABLETYPE, PERM_MASK_ANY, RLV_LOCK_ANY, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user