diff options
Diffstat (limited to 'linden/indra/newview/llinventorybridge.cpp')
-rw-r--r-- | linden/indra/newview/llinventorybridge.cpp | 45 |
1 files changed, 34 insertions, 11 deletions
diff --git a/linden/indra/newview/llinventorybridge.cpp b/linden/indra/newview/llinventorybridge.cpp index fe56ae0..41af123 100644 --- a/linden/indra/newview/llinventorybridge.cpp +++ b/linden/indra/newview/llinventorybridge.cpp | |||
@@ -3463,10 +3463,32 @@ void rez_attachment(LLViewerInventoryItem* item, LLViewerJointAttachment* attach | |||
3463 | 3463 | ||
3464 | if (attachment && attachment->getObject()) | 3464 | if (attachment && attachment->getObject()) |
3465 | { | 3465 | { |
3466 | // [RLVa:KB] - Version: 1.23.4 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a | ||
3467 | if ( (rlv_handler_t::isEnabled()) && // Can't replace an existing object if it's undetachable | ||
3468 | (gRlvHandler.isLockedAttachment(attach_pt, RLV_LOCK_ANY)) ) // or if we're not allowed to attach to that attach point | ||
3469 | { | ||
3470 | return; | ||
3471 | } | ||
3472 | // [/RLVa:KB] | ||
3466 | LLNotifications::instance().add("ReplaceAttachment", LLSD(), payload, confirm_replace_attachment_rez); | 3473 | LLNotifications::instance().add("ReplaceAttachment", LLSD(), payload, confirm_replace_attachment_rez); |
3467 | } | 3474 | } |
3468 | else | 3475 | else |
3469 | { | 3476 | { |
3477 | // [RLVa:KB] - Version: 1.23.4 | Checked: 2009-10-10 (RLVa-1.0.5) | Modified: RLVa-1.0.5 | ||
3478 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) | ||
3479 | { | ||
3480 | if (0 == attach_pt) // Can't wear on the default attachment point | ||
3481 | { | ||
3482 | if (!RlvSettings::getEnableWear()) // (unless "Enable Wear" is enabled) | ||
3483 | return; | ||
3484 | gRlvHandler.onWearAttachment(item->getUUID()); | ||
3485 | } | ||
3486 | else if (gRlvHandler.isLockedAttachment(attach_pt, RLV_LOCK_ADD)) // and we can never wear on a non-attachable attach point | ||
3487 | { | ||
3488 | return; | ||
3489 | } | ||
3490 | } | ||
3491 | // [/RLVa:KB] | ||
3470 | LLNotifications::instance().forceResponse(LLNotification::Params("ReplaceAttachment").payload(payload), 0/*YES*/); | 3492 | LLNotifications::instance().forceResponse(LLNotification::Params("ReplaceAttachment").payload(payload), 0/*YES*/); |
3471 | } | 3493 | } |
3472 | } | 3494 | } |
@@ -3553,7 +3575,7 @@ void LLObjectBridge::buildContextMenu(LLMenuGL& menu, U32 flags) | |||
3553 | items.push_back(std::string("RestoreToWorld Separator")); | 3575 | items.push_back(std::string("RestoreToWorld Separator")); |
3554 | items.push_back(std::string("Restore to Last Position")); | 3576 | items.push_back(std::string("Restore to Last Position")); |
3555 | 3577 | ||
3556 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a | 3578 | // [RLVa:KB] - Version: 1.23.4 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
3557 | if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getEnableWear()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) | 3579 | if ( (rlv_handler_t::isEnabled()) && (!RlvSettings::getEnableWear()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) |
3558 | { | 3580 | { |
3559 | LLViewerJointAttachment* pAttachPt = gRlvHandler.getAttachPoint(item, true); // The item's name should specify | 3581 | LLViewerJointAttachment* pAttachPt = gRlvHandler.getAttachPoint(item, true); // The item's name should specify |
@@ -4113,7 +4135,7 @@ void wear_inventory_category_on_avatar_step2( BOOL proceed, void* userdata ) | |||
4113 | is_gesture); | 4135 | is_gesture); |
4114 | S32 gest_count = gest_item_array.count(); | 4136 | S32 gest_count = gest_item_array.count(); |
4115 | 4137 | ||
4116 | // [RLVa:KB] - Version: 1.22.11 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a | 4138 | // [RLVa:KB] - Version: 1.23.4 | Checked: 2009-10-10 (RLVa-1.0.5a) | Modified: RLVa-1.0.5a |
4117 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) | 4139 | if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) |
4118 | { | 4140 | { |
4119 | // Filter anything that we shouldn't be attaching | 4141 | // Filter anything that we shouldn't be attaching |
@@ -4395,10 +4417,11 @@ void wear_attachments_on_avatar(const LLInventoryModel::item_array_t& items, BOO | |||
4395 | msg->addU8Fast(_PREHASH_TotalObjects, count ); | 4417 | msg->addU8Fast(_PREHASH_TotalObjects, count ); |
4396 | // msg->addBOOLFast(_PREHASH_FirstDetachAll, remove ); | 4418 | // msg->addBOOLFast(_PREHASH_FirstDetachAll, remove ); |
4397 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a | 4419 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a |
4398 | // This really should just *always* be FALSE since TRUE can result in loss of the current asset state | 4420 | // This really should just *always* be FALSE since TRUE can result in loss of the current asset state |
4399 | msg->addBOOLFast(_PREHASH_FirstDetachAll, remove && (!gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ); | 4421 | msg->addBOOLFast(_PREHASH_FirstDetachAll, |
4422 | (remove) && (!gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ); | ||
4400 | // [/RLVa:KB] | 4423 | // [/RLVa:KB] |
4401 | } | 4424 | } |
4402 | 4425 | ||
4403 | LLInventoryItem* item = items.get(i); | 4426 | LLInventoryItem* item = items.get(i); |
4404 | msg->nextBlockFast(_PREHASH_ObjectData ); | 4427 | msg->nextBlockFast(_PREHASH_ObjectData ); |
@@ -4406,10 +4429,10 @@ void wear_attachments_on_avatar(const LLInventoryModel::item_array_t& items, BOO | |||
4406 | msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); | 4429 | msg->addUUIDFast(_PREHASH_OwnerID, item->getPermissions().getOwner()); |
4407 | // msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point | 4430 | // msg->addU8Fast(_PREHASH_AttachmentPt, 0 ); // Wear at the previous or default attachment point |
4408 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a | 4431 | // [RLVa:KB] - Checked: 2009-10-10 (RLVa-1.0.5a) | Added: RLVa-1.0.5a |
4409 | msg->addU8Fast(_PREHASH_AttachmentPt, | 4432 | msg->addU8Fast(_PREHASH_AttachmentPt, |
4410 | ( (!rlv_handler_t::isEnabled()) || (RlvSettings::getEnableWear()) || (!gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) | 4433 | ( (!rlv_handler_t::isEnabled()) || (RlvSettings::getEnableWear()) || (!gRlvHandler.hasLockedAttachment(RLV_LOCK_ANY)) ) |
4411 | ? 0 | 4434 | ? 0 |
4412 | : gRlvHandler.getAttachPointIndex(gRlvHandler.getAttachPoint(item, true))); | 4435 | : gRlvHandler.getAttachPointIndex(gRlvHandler.getAttachPoint(item, true))); |
4413 | // [/RLVa:KB] | 4436 | // [/RLVa:KB] |
4414 | pack_permissions_slam(msg, item->getFlags(), item->getPermissions()); | 4437 | pack_permissions_slam(msg, item->getFlags(), item->getPermissions()); |
4415 | msg->addStringFast(_PREHASH_Name, item->getName()); | 4438 | msg->addStringFast(_PREHASH_Name, item->getName()); |
@@ -4930,11 +4953,11 @@ void LLWearableBridge::onRemoveFromAvatarArrived(LLWearable* wearable, | |||
4930 | { | 4953 | { |
4931 | EWearableType type = wearable->getType(); | 4954 | EWearableType type = wearable->getType(); |
4932 | 4955 | ||
4933 | //if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR ) ) //&& | 4956 | // if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR ) ) //&& |
4934 | //!((!gAgent.isTeen()) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) ) | ||
4935 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.2a | SL big fix | 4957 | // [RLVa:KB] - Checked: 2009-07-08 (RLVa-1.0.0e) | Added: RLVa-0.2.2a | SL big fix |
4936 | if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES) ) | 4958 | if( !(type==WT_SHAPE || type==WT_SKIN || type==WT_HAIR || type==WT_EYES) ) |
4937 | // [/RLVa:KB] | 4959 | // [/RLVa:KB] |
4960 | //!((!gAgent.isTeen()) && ( type==WT_UNDERPANTS || type==WT_UNDERSHIRT )) ) | ||
4938 | { | 4961 | { |
4939 | gAgent.removeWearable( type ); | 4962 | gAgent.removeWearable( type ); |
4940 | } | 4963 | } |