Fixed pretend inventory drag and drop, and random additions that might
keep us from crashing.
This commit is contained in:
@@ -133,6 +133,13 @@ BOOL LLHandMotion::onUpdate(F32 time, U8* joint_mask)
|
|||||||
mLastTime = time;
|
mLastTime = time;
|
||||||
|
|
||||||
requestedHandPose = (eHandPose *)mCharacter->getAnimationData("Hand Pose");
|
requestedHandPose = (eHandPose *)mCharacter->getAnimationData("Hand Pose");
|
||||||
|
// <edit>
|
||||||
|
if(requestedHandPose && *requestedHandPose >= NUM_HAND_POSES)
|
||||||
|
{
|
||||||
|
llwarns << "requested hand pose >= NUM_HAND_POSES" << llendl;
|
||||||
|
requestedHandPose = &mCurrentPose;
|
||||||
|
}
|
||||||
|
// </edit>
|
||||||
// check to see if requested pose has changed
|
// check to see if requested pose has changed
|
||||||
if (!requestedHandPose)
|
if (!requestedHandPose)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -801,7 +801,9 @@ void LLUUID::generate()
|
|||||||
#endif
|
#endif
|
||||||
if (!has_init)
|
if (!has_init)
|
||||||
{
|
{
|
||||||
if (getNodeID(node_id) <= 0)
|
// <edit>
|
||||||
|
//if (getNodeID(node_id) <= 0)
|
||||||
|
// </edit>
|
||||||
{
|
{
|
||||||
get_random_bytes(node_id, 6);
|
get_random_bytes(node_id, 6);
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -319,8 +319,16 @@ public:
|
|||||||
child = getChild(i);
|
child = getChild(i);
|
||||||
if (child->isInside(data->getPositionGroup()))
|
if (child->isInside(data->getPositionGroup()))
|
||||||
{
|
{
|
||||||
child->insert(data);
|
// <edit>
|
||||||
return false;
|
// tempfix, test, shitsux
|
||||||
|
//child->insert(data);
|
||||||
|
if(child->getElementCount() < LL_OCTREE_MAX_CAPACITY)
|
||||||
|
{
|
||||||
|
child->insert(data);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
//return false;
|
||||||
|
// </edit>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -738,7 +738,12 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
|
|||||||
{
|
{
|
||||||
src = LLToolDragAndDrop::SOURCE_LIBRARY;
|
src = LLToolDragAndDrop::SOURCE_LIBRARY;
|
||||||
}
|
}
|
||||||
|
// <edit>
|
||||||
|
else if(mListener && gInventory.isObjectDescendentOf(mListener->getUUID(), gLocalInventoryRoot))
|
||||||
|
{ // Note: this is only ok if all future pretend folders are subcategories of Pretend Inventory
|
||||||
|
src = LLToolDragAndDrop::SOURCE_LIBRARY;
|
||||||
|
}
|
||||||
|
// </edit>
|
||||||
can_drag = root->startDrag(src);
|
can_drag = root->startDrag(src);
|
||||||
if (can_drag)
|
if (can_drag)
|
||||||
{
|
{
|
||||||
@@ -779,7 +784,10 @@ BOOL LLFolderViewItem::handleHover( S32 x, S32 y, MASK mask )
|
|||||||
|
|
||||||
BOOL LLFolderViewItem::handleDoubleClick( S32 x, S32 y, MASK mask )
|
BOOL LLFolderViewItem::handleDoubleClick( S32 x, S32 y, MASK mask )
|
||||||
{
|
{
|
||||||
preview();
|
// <edit>
|
||||||
|
//preview();
|
||||||
|
openItem();
|
||||||
|
// </edit>
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,9 @@
|
|||||||
#include "llworld.h"
|
#include "llworld.h"
|
||||||
#include "object_flags.h"
|
#include "object_flags.h"
|
||||||
#include "llimview.h"
|
#include "llimview.h"
|
||||||
|
// <edit>
|
||||||
|
#include "llappviewer.h" // gLocalInventoryRoot
|
||||||
|
// </edit>
|
||||||
|
|
||||||
// MAX ITEMS is based on (sizeof(uuid)+2) * count must be < MTUBYTES
|
// MAX ITEMS is based on (sizeof(uuid)+2) * count must be < MTUBYTES
|
||||||
// or 18 * count < 1200 => count < 1200/18 => 66. I've cut it down a
|
// or 18 * count < 1200 => count < 1200/18 => 66. I've cut it down a
|
||||||
@@ -383,8 +385,12 @@ LLToolDragAndDrop::dragOrDrop3dImpl LLToolDragAndDrop::sDragAndDrop3d[DAD_COUNT]
|
|||||||
{
|
{
|
||||||
&LLToolDragAndDrop::dad3dNULL, // Dest: DT_NONE
|
&LLToolDragAndDrop::dad3dNULL, // Dest: DT_NONE
|
||||||
&LLToolDragAndDrop::dad3dNULL, // Dest: DT_SELF
|
&LLToolDragAndDrop::dad3dNULL, // Dest: DT_SELF
|
||||||
&LLToolDragAndDrop::dad3dNULL, // Dest: DT_AVATAR
|
// <edit>
|
||||||
&LLToolDragAndDrop::dad3dNULL, // Dest: DT_OBJECT
|
//&LLToolDragAndDrop::dad3dNULL, // Dest: DT_AVATAR
|
||||||
|
//&LLToolDragAndDrop::dad3dNULL, // Dest: DT_OBJECT
|
||||||
|
&LLToolDragAndDrop::dad3dGiveInventory, // Dest: DT_AVATAR
|
||||||
|
&LLToolDragAndDrop::dad3dUpdateInventory, // Dest: DT_OBJECT
|
||||||
|
// </edit>
|
||||||
&LLToolDragAndDrop::dad3dNULL, // Dest: DT_LAND
|
&LLToolDragAndDrop::dad3dNULL, // Dest: DT_LAND
|
||||||
},
|
},
|
||||||
// Source: DAD_LANDMARK
|
// Source: DAD_LANDMARK
|
||||||
@@ -1143,11 +1149,13 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LLUUID asset_id = item->getAssetUUID();
|
LLUUID asset_id = item->getAssetUUID();
|
||||||
BOOL success = handleDropTextureProtections(hit_obj, item, source, src_id);
|
// <edit>
|
||||||
|
/*BOOL success = handleDropTextureProtections(hit_obj, item, source, src_id);
|
||||||
if(!success)
|
if(!success)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
// </edit>
|
||||||
LLViewerImage* image = gImageList.getImage(asset_id);
|
LLViewerImage* image = gImageList.getImage(asset_id);
|
||||||
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
|
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
|
||||||
S32 num_faces = hit_obj->getNumTEs();
|
S32 num_faces = hit_obj->getNumTEs();
|
||||||
@@ -1185,11 +1193,13 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LLUUID asset_id = item->getAssetUUID();
|
LLUUID asset_id = item->getAssetUUID();
|
||||||
BOOL success = handleDropTextureProtections(hit_obj, item, source, src_id);
|
// <edit>
|
||||||
|
/*BOOL success = handleDropTextureProtections(hit_obj, item, source, src_id);
|
||||||
if(!success)
|
if(!success)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}*/
|
||||||
|
// </edit>
|
||||||
// update viewer side image in anticipation of update from simulator
|
// update viewer side image in anticipation of update from simulator
|
||||||
LLViewerImage* image = gImageList.getImage(asset_id);
|
LLViewerImage* image = gImageList.getImage(asset_id);
|
||||||
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
|
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_EDIT_TEXTURE_COUNT );
|
||||||
@@ -1247,13 +1257,19 @@ void LLToolDragAndDrop::dropScript(LLViewerObject* hit_obj,
|
|||||||
}
|
}
|
||||||
hit_obj->saveScript(new_script, active, true);
|
hit_obj->saveScript(new_script, active, true);
|
||||||
gFloaterTools->dirty();
|
gFloaterTools->dirty();
|
||||||
|
// <edit>
|
||||||
|
if(gSavedSettings.getBOOL("BroadcastViewerEffects"))
|
||||||
|
{
|
||||||
|
// </edit>
|
||||||
// VEFFECT: SetScript
|
// VEFFECT: SetScript
|
||||||
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
|
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
|
||||||
effectp->setSourceObject(gAgent.getAvatarObject());
|
effectp->setSourceObject(gAgent.getAvatarObject());
|
||||||
effectp->setTargetObject(hit_obj);
|
effectp->setTargetObject(hit_obj);
|
||||||
effectp->setDuration(LL_HUD_DUR_SHORT);
|
effectp->setDuration(LL_HUD_DUR_SHORT);
|
||||||
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
|
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
|
||||||
|
// <edit>
|
||||||
|
}
|
||||||
|
// </edit>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1409,14 +1425,19 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
|
|||||||
gInventory.deleteObject(item->getUUID());
|
gInventory.deleteObject(item->getUUID());
|
||||||
gInventory.notifyObservers();
|
gInventory.notifyObservers();
|
||||||
}
|
}
|
||||||
|
// <edit>
|
||||||
|
if(gSavedSettings.getBOOL("BroadcastViewerEffects"))
|
||||||
|
{
|
||||||
|
// </edit>
|
||||||
// VEFFECT: DropObject
|
// VEFFECT: DropObject
|
||||||
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
|
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
|
||||||
effectp->setSourceObject(gAgent.getAvatarObject());
|
effectp->setSourceObject(gAgent.getAvatarObject());
|
||||||
effectp->setPositionGlobal(mLastHitPos);
|
effectp->setPositionGlobal(mLastHitPos);
|
||||||
effectp->setDuration(LL_HUD_DUR_SHORT);
|
effectp->setDuration(LL_HUD_DUR_SHORT);
|
||||||
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
|
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
|
||||||
|
// <edit>
|
||||||
|
}
|
||||||
|
// </edit>
|
||||||
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_REZ_COUNT);
|
LLViewerStats::getInstance()->incStat(LLViewerStats::ST_REZ_COUNT);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1472,13 +1493,19 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj,
|
|||||||
// *FIX: only show this if panel not expanded?
|
// *FIX: only show this if panel not expanded?
|
||||||
gFloaterTools->showPanel(LLFloaterTools::PANEL_CONTENTS);
|
gFloaterTools->showPanel(LLFloaterTools::PANEL_CONTENTS);
|
||||||
}
|
}
|
||||||
|
// <edit>
|
||||||
|
if(gSavedSettings.getBOOL("BroadcastViewerEffects"))
|
||||||
|
{
|
||||||
|
// </edit>
|
||||||
// VEFFECT: AddToInventory
|
// VEFFECT: AddToInventory
|
||||||
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
|
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
|
||||||
effectp->setSourceObject(gAgent.getAvatarObject());
|
effectp->setSourceObject(gAgent.getAvatarObject());
|
||||||
effectp->setTargetObject(hit_obj);
|
effectp->setTargetObject(hit_obj);
|
||||||
effectp->setDuration(LL_HUD_DUR_SHORT);
|
effectp->setDuration(LL_HUD_DUR_SHORT);
|
||||||
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
|
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
|
||||||
|
// <edit>
|
||||||
|
}
|
||||||
|
// <edit>
|
||||||
gFloaterTools->dirty();
|
gFloaterTools->dirty();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1582,13 +1609,19 @@ void LLToolDragAndDrop::commitGiveInventoryItem(const LLUUID& to_agent,
|
|||||||
bucket,
|
bucket,
|
||||||
BUCKET_SIZE);
|
BUCKET_SIZE);
|
||||||
gAgent.sendReliableMessage();
|
gAgent.sendReliableMessage();
|
||||||
|
// <edit>
|
||||||
|
if(gSavedSettings.getBOOL("BroadcastViewerEffects"))
|
||||||
|
{
|
||||||
|
// </edit>
|
||||||
// VEFFECT: giveInventory
|
// VEFFECT: giveInventory
|
||||||
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
|
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
|
||||||
effectp->setSourceObject(gAgent.getAvatarObject());
|
effectp->setSourceObject(gAgent.getAvatarObject());
|
||||||
effectp->setTargetObject(gObjectList.findObject(to_agent));
|
effectp->setTargetObject(gObjectList.findObject(to_agent));
|
||||||
effectp->setDuration(LL_HUD_DUR_SHORT);
|
effectp->setDuration(LL_HUD_DUR_SHORT);
|
||||||
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
|
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
|
||||||
|
// <edit>
|
||||||
|
}
|
||||||
|
// </edit>
|
||||||
gFloaterTools->dirty();
|
gFloaterTools->dirty();
|
||||||
|
|
||||||
LLMuteList::getInstance()->autoRemove(to_agent, LLMuteList::AR_INVENTORY);
|
LLMuteList::getInstance()->autoRemove(to_agent, LLMuteList::AR_INVENTORY);
|
||||||
@@ -1799,13 +1832,19 @@ void LLToolDragAndDrop::commitGiveInventoryCategory(const LLUUID& to_agent,
|
|||||||
bucket_size);
|
bucket_size);
|
||||||
gAgent.sendReliableMessage();
|
gAgent.sendReliableMessage();
|
||||||
delete[] bucket;
|
delete[] bucket;
|
||||||
|
// <edit>
|
||||||
|
if(gSavedSettings.getBOOL("BroadcastViewerEffects"))
|
||||||
|
{
|
||||||
|
// </edit>
|
||||||
// VEFFECT: giveInventoryCategory
|
// VEFFECT: giveInventoryCategory
|
||||||
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
|
LLHUDEffectSpiral *effectp = (LLHUDEffectSpiral *)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_BEAM, TRUE);
|
||||||
effectp->setSourceObject(gAgent.getAvatarObject());
|
effectp->setSourceObject(gAgent.getAvatarObject());
|
||||||
effectp->setTargetObject(gObjectList.findObject(to_agent));
|
effectp->setTargetObject(gObjectList.findObject(to_agent));
|
||||||
effectp->setDuration(LL_HUD_DUR_SHORT);
|
effectp->setDuration(LL_HUD_DUR_SHORT);
|
||||||
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
|
effectp->setColor(LLColor4U(gAgent.getEffectColor()));
|
||||||
|
// <edit>
|
||||||
|
}
|
||||||
|
// </edit>
|
||||||
gFloaterTools->dirty();
|
gFloaterTools->dirty();
|
||||||
|
|
||||||
LLMuteList::getInstance()->autoRemove(to_agent, LLMuteList::AR_INVENTORY);
|
LLMuteList::getInstance()->autoRemove(to_agent, LLMuteList::AR_INVENTORY);
|
||||||
@@ -1833,30 +1872,40 @@ BOOL LLToolDragAndDrop::isInventoryGiveAcceptable(LLInventoryItem* item)
|
|||||||
BOOL copyable = FALSE;
|
BOOL copyable = FALSE;
|
||||||
if(item->getPermissions().allowCopyBy(gAgent.getID())) copyable = TRUE;
|
if(item->getPermissions().allowCopyBy(gAgent.getID())) copyable = TRUE;
|
||||||
|
|
||||||
LLVOAvatar* my_avatar = gAgent.getAvatarObject();
|
// <edit>
|
||||||
|
/*LLVOAvatar* my_avatar = gAgent.getAvatarObject();
|
||||||
if(!my_avatar)
|
if(!my_avatar)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}*/
|
||||||
|
// </edit>
|
||||||
|
|
||||||
|
// <edit>
|
||||||
|
//BOOL acceptable = FALSE;
|
||||||
BOOL acceptable = TRUE;
|
BOOL acceptable = TRUE;
|
||||||
|
// Might also look at what's down below
|
||||||
|
// </edit>
|
||||||
switch(item->getType())
|
switch(item->getType())
|
||||||
{
|
{
|
||||||
case LLAssetType::AT_CALLINGCARD:
|
case LLAssetType::AT_CALLINGCARD:
|
||||||
acceptable = FALSE;
|
acceptable = FALSE;
|
||||||
break;
|
break;
|
||||||
case LLAssetType::AT_OBJECT:
|
case LLAssetType::AT_OBJECT:
|
||||||
if(my_avatar->isWearingAttachment(item->getUUID()))
|
// <edit>
|
||||||
|
/*if(my_avatar->isWearingAttachment(item->getUUID()))
|
||||||
{
|
{
|
||||||
acceptable = FALSE;
|
acceptable = FALSE;
|
||||||
}
|
}*/
|
||||||
|
// </edit>
|
||||||
break;
|
break;
|
||||||
case LLAssetType::AT_BODYPART:
|
case LLAssetType::AT_BODYPART:
|
||||||
case LLAssetType::AT_CLOTHING:
|
case LLAssetType::AT_CLOTHING:
|
||||||
if(!copyable && gAgent.isWearingItem(item->getUUID()))
|
// <edit>
|
||||||
|
/*if(!copyable && gAgent.isWearingItem(item->getUUID()))
|
||||||
{
|
{
|
||||||
acceptable = FALSE;
|
acceptable = FALSE;
|
||||||
}
|
}*/
|
||||||
|
// </edit>
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@@ -1890,6 +1939,9 @@ BOOL LLToolDragAndDrop::isInventoryGroupGiveAcceptable(LLInventoryItem* item)
|
|||||||
}
|
}
|
||||||
|
|
||||||
BOOL acceptable = TRUE;
|
BOOL acceptable = TRUE;
|
||||||
|
// <edit>
|
||||||
|
/*
|
||||||
|
// </edit>
|
||||||
switch(item->getType())
|
switch(item->getType())
|
||||||
{
|
{
|
||||||
case LLAssetType::AT_CALLINGCARD:
|
case LLAssetType::AT_CALLINGCARD:
|
||||||
@@ -1904,6 +1956,9 @@ BOOL LLToolDragAndDrop::isInventoryGroupGiveAcceptable(LLInventoryItem* item)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// <edit>
|
||||||
|
*/
|
||||||
|
// </edit>
|
||||||
return acceptable;
|
return acceptable;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1915,7 +1970,10 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
|
|||||||
if(!item || !obj) return ACCEPT_NO;
|
if(!item || !obj) return ACCEPT_NO;
|
||||||
// HACK: downcast
|
// HACK: downcast
|
||||||
LLViewerInventoryItem* vitem = (LLViewerInventoryItem*)item;
|
LLViewerInventoryItem* vitem = (LLViewerInventoryItem*)item;
|
||||||
if(!vitem->isComplete()) return ACCEPT_NO;
|
// <edit>
|
||||||
|
//if(!vitem->isComplete()) return ACCEPT_NO;
|
||||||
|
if(!vitem->isComplete() && !(gInventory.isObjectDescendentOf(vitem->getUUID(), gLocalInventoryRoot))) return ACCEPT_NO;
|
||||||
|
// </edit>
|
||||||
|
|
||||||
// deny attempts to drop from an object onto itself. This is to
|
// deny attempts to drop from an object onto itself. This is to
|
||||||
// help make sure that drops that are from an object to an object
|
// help make sure that drops that are from an object to an object
|
||||||
@@ -1973,7 +2031,10 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
|
|||||||
{
|
{
|
||||||
return ACCEPT_NO_LOCKED;
|
return ACCEPT_NO_LOCKED;
|
||||||
}
|
}
|
||||||
return ACCEPT_NO;
|
// <edit> allow dropping textures onto objects
|
||||||
|
//return ACCEPT_NO;
|
||||||
|
return ACCEPT_YES_SINGLE;
|
||||||
|
// </edit>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -2086,11 +2147,13 @@ EAcceptance LLToolDragAndDrop::dad3dRezAttachmentFromInv(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// must not be already wearing it
|
// must not be already wearing it
|
||||||
LLVOAvatar* avatar = gAgent.getAvatarObject();
|
// <edit>
|
||||||
if( !avatar || avatar->isWearingAttachment(item->getUUID()) )
|
//LLVOAvatar* my_avatar = gAgent.getAvatarObject();
|
||||||
{
|
//if( !my_avatar || my_avatar->isWearingAttachment( item->getUUID() ) )
|
||||||
return ACCEPT_NO;
|
//{
|
||||||
}
|
// return ACCEPT_NO;
|
||||||
|
//}
|
||||||
|
// </edit>
|
||||||
|
|
||||||
if( drop )
|
if( drop )
|
||||||
{
|
{
|
||||||
@@ -2128,12 +2191,13 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnLand(
|
|||||||
locateInventory(item, cat);
|
locateInventory(item, cat);
|
||||||
if(!item || !item->isComplete()) return ACCEPT_NO;
|
if(!item || !item->isComplete()) return ACCEPT_NO;
|
||||||
|
|
||||||
LLVOAvatar* my_avatar = gAgent.getAvatarObject();
|
// <edit>
|
||||||
if( !my_avatar || my_avatar->isWearingAttachment( item->getUUID() ) )
|
//LLVOAvatar* my_avatar = gAgent.getAvatarObject();
|
||||||
{
|
//if( !my_avatar || my_avatar->isWearingAttachment( item->getUUID() ) )
|
||||||
return ACCEPT_NO;
|
//{
|
||||||
}
|
// return ACCEPT_NO;
|
||||||
|
//}
|
||||||
|
// </edit>
|
||||||
EAcceptance accept;
|
EAcceptance accept;
|
||||||
BOOL remove_inventory;
|
BOOL remove_inventory;
|
||||||
|
|
||||||
@@ -2191,11 +2255,13 @@ EAcceptance LLToolDragAndDrop::dad3dRezObjectOnObject(
|
|||||||
LLViewerInventoryCategory* cat;
|
LLViewerInventoryCategory* cat;
|
||||||
locateInventory(item, cat);
|
locateInventory(item, cat);
|
||||||
if(!item || !item->isComplete()) return ACCEPT_NO;
|
if(!item || !item->isComplete()) return ACCEPT_NO;
|
||||||
LLVOAvatar* my_avatar = gAgent.getAvatarObject();
|
// <edit>
|
||||||
if( !my_avatar || my_avatar->isWearingAttachment( item->getUUID() ) )
|
//LLVOAvatar* my_avatar = gAgent.getAvatarObject();
|
||||||
{
|
//if( !my_avatar || my_avatar->isWearingAttachment( item->getUUID() ) )
|
||||||
return ACCEPT_NO;
|
//{
|
||||||
}
|
// return ACCEPT_NO;
|
||||||
|
//}
|
||||||
|
// </edit>
|
||||||
|
|
||||||
if((mask & MASK_CONTROL))
|
if((mask & MASK_CONTROL))
|
||||||
{
|
{
|
||||||
@@ -2299,17 +2365,24 @@ EAcceptance LLToolDragAndDrop::dad3dTextureObject(
|
|||||||
{
|
{
|
||||||
lldebugs << "LLToolDragAndDrop::dad3dTextureObject()" << llendl;
|
lldebugs << "LLToolDragAndDrop::dad3dTextureObject()" << llendl;
|
||||||
|
|
||||||
|
// <edit>
|
||||||
|
// Fuck this
|
||||||
|
|
||||||
// *HACK: In order to resolve SL-22177, we need to block drags
|
// *HACK: In order to resolve SL-22177, we need to block drags
|
||||||
// from notecards and objects onto other objects.
|
// from notecards and objects onto other objects.
|
||||||
if((SOURCE_WORLD == mSource) || (SOURCE_NOTECARD == mSource))
|
//if((SOURCE_WORLD == mSource) || (SOURCE_NOTECARD == mSource))
|
||||||
{
|
//{
|
||||||
return ACCEPT_NO;
|
// return ACCEPT_NO;
|
||||||
}
|
//}
|
||||||
|
// </edit>
|
||||||
|
|
||||||
LLViewerInventoryItem* item;
|
LLViewerInventoryItem* item;
|
||||||
LLViewerInventoryCategory* cat;
|
LLViewerInventoryCategory* cat;
|
||||||
locateInventory(item, cat);
|
locateInventory(item, cat);
|
||||||
if(!item || !item->isComplete()) return ACCEPT_NO;
|
// <edit>
|
||||||
|
//if(!item || !item->isComplete()) return ACCEPT_NO;
|
||||||
|
if( !item || (!item->isComplete() && !(gInventory.isObjectDescendentOf(item->getUUID(), gLocalInventoryRoot))) ) return ACCEPT_NO;
|
||||||
|
// </edit>
|
||||||
EAcceptance rv = willObjectAcceptInventory(obj, item);
|
EAcceptance rv = willObjectAcceptInventory(obj, item);
|
||||||
if((mask & MASK_CONTROL))
|
if((mask & MASK_CONTROL))
|
||||||
{
|
{
|
||||||
@@ -2319,6 +2392,9 @@ EAcceptance LLToolDragAndDrop::dad3dTextureObject(
|
|||||||
}
|
}
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
// <edit>
|
||||||
|
/*
|
||||||
|
// </edit>
|
||||||
if(!obj->permModify())
|
if(!obj->permModify())
|
||||||
{
|
{
|
||||||
return ACCEPT_NO_LOCKED;
|
return ACCEPT_NO_LOCKED;
|
||||||
@@ -2328,6 +2404,9 @@ EAcceptance LLToolDragAndDrop::dad3dTextureObject(
|
|||||||
{
|
{
|
||||||
return ACCEPT_NO;
|
return ACCEPT_NO;
|
||||||
}
|
}
|
||||||
|
// <edit>
|
||||||
|
*/
|
||||||
|
// </edit>
|
||||||
|
|
||||||
if(drop && (ACCEPT_YES_SINGLE <= rv))
|
if(drop && (ACCEPT_YES_SINGLE <= rv))
|
||||||
{
|
{
|
||||||
@@ -2755,11 +2834,13 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnLand(
|
|||||||
locateInventory(item, cat);
|
locateInventory(item, cat);
|
||||||
if(!item || !item->isComplete()) return ACCEPT_NO;
|
if(!item || !item->isComplete()) return ACCEPT_NO;
|
||||||
|
|
||||||
if(!gAgent.allowOperation(PERM_COPY, item->getPermissions())
|
// <edit>
|
||||||
|| !item->getPermissions().allowTransferTo(LLUUID::null))
|
//if(!gAgent.allowOperation(PERM_COPY, item->getPermissions())
|
||||||
{
|
// || !item->getPermissions().allowTransferTo(LLUUID::null))
|
||||||
return ACCEPT_NO_LOCKED;
|
//{
|
||||||
}
|
// return ACCEPT_NO_LOCKED;
|
||||||
|
//}
|
||||||
|
// </edit>
|
||||||
if(drop)
|
if(drop)
|
||||||
{
|
{
|
||||||
dropObject(obj, TRUE, TRUE, FALSE);
|
dropObject(obj, TRUE, TRUE, FALSE);
|
||||||
@@ -2789,12 +2870,14 @@ EAcceptance LLToolDragAndDrop::dad3dRezFromObjectOnObject(
|
|||||||
//}
|
//}
|
||||||
//return rv;
|
//return rv;
|
||||||
}
|
}
|
||||||
if(!item->getPermissions().allowCopyBy(gAgent.getID(),
|
// <edit>
|
||||||
gAgent.getGroupID())
|
//if(!item->getPermissions().allowCopyBy(gAgent.getID(),
|
||||||
|| !item->getPermissions().allowTransferTo(LLUUID::null))
|
// gAgent.getGroupID())
|
||||||
{
|
// || !item->getPermissions().allowTransferTo(LLUUID::null))
|
||||||
return ACCEPT_NO_LOCKED;
|
//{
|
||||||
}
|
// return ACCEPT_NO_LOCKED;
|
||||||
|
//}
|
||||||
|
// </edit>a
|
||||||
if(drop)
|
if(drop)
|
||||||
{
|
{
|
||||||
dropObject(obj, FALSE, TRUE, FALSE);
|
dropObject(obj, FALSE, TRUE, FALSE);
|
||||||
|
|||||||
@@ -51,6 +51,10 @@
|
|||||||
#include "llpreviewgesture.h"
|
#include "llpreviewgesture.h"
|
||||||
#include "llviewerwindow.h"
|
#include "llviewerwindow.h"
|
||||||
|
|
||||||
|
// <edit>
|
||||||
|
#include "llappviewer.h" // gLocalInventoryRoot
|
||||||
|
// </edit>
|
||||||
|
|
||||||
///----------------------------------------------------------------------------
|
///----------------------------------------------------------------------------
|
||||||
/// Local function declarations, constants, enums, and typedefs
|
/// Local function declarations, constants, enums, and typedefs
|
||||||
///----------------------------------------------------------------------------
|
///----------------------------------------------------------------------------
|
||||||
@@ -99,11 +103,12 @@ LLViewerInventoryItem::LLViewerInventoryItem(const LLViewerInventoryItem* other)
|
|||||||
LLInventoryItem()
|
LLInventoryItem()
|
||||||
{
|
{
|
||||||
copyViewerItem(other);
|
copyViewerItem(other);
|
||||||
if (!mIsComplete)
|
// <edit>
|
||||||
{
|
//if (!mIsComplete)
|
||||||
llwarns << "LLViewerInventoryItem copy constructor for incomplete item"
|
//{
|
||||||
<< mUUID << llendl;
|
// llwarns << "LLViewerInventoryItem copy constructor for incomplete item"
|
||||||
}
|
// << mUUID << llendl;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
LLViewerInventoryItem::LLViewerInventoryItem(const LLInventoryItem *other) :
|
LLViewerInventoryItem::LLViewerInventoryItem(const LLInventoryItem *other) :
|
||||||
@@ -145,6 +150,12 @@ void LLViewerInventoryItem::cloneViewerItem(LLPointer<LLViewerInventoryItem>& ne
|
|||||||
|
|
||||||
void LLViewerInventoryItem::removeFromServer()
|
void LLViewerInventoryItem::removeFromServer()
|
||||||
{
|
{
|
||||||
|
// <edit> this check is ghetto
|
||||||
|
if((mParentUUID == gLocalInventoryRoot) || (gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot)))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// </edit>
|
||||||
llinfos << "Removing inventory item " << mUUID << " from server."
|
llinfos << "Removing inventory item " << mUUID << " from server."
|
||||||
<< llendl;
|
<< llendl;
|
||||||
|
|
||||||
@@ -163,20 +174,24 @@ void LLViewerInventoryItem::removeFromServer()
|
|||||||
|
|
||||||
void LLViewerInventoryItem::updateServer(BOOL is_new) const
|
void LLViewerInventoryItem::updateServer(BOOL is_new) const
|
||||||
{
|
{
|
||||||
/*if(!mIsComplete)
|
// <edit>
|
||||||
|
//if(gAgent.getID() != mPermissions.getOwner())
|
||||||
|
//{
|
||||||
|
// // *FIX: deal with this better.
|
||||||
|
// llwarns << "LLViewerInventoryItem::updateServer() - for unowned item"
|
||||||
|
// << llendl;
|
||||||
|
if((mParentUUID == gLocalInventoryRoot) || (gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot)))
|
||||||
|
{
|
||||||
|
// </edit>
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(!mIsComplete)
|
||||||
{
|
{
|
||||||
// *FIX: deal with this better.
|
// *FIX: deal with this better.
|
||||||
// If we're crashing here then the UI is incorrectly enabled.
|
// If we're crashing here then the UI is incorrectly enabled.
|
||||||
llerrs << "LLViewerInventoryItem::updateServer() - for incomplete item"
|
llwarns << "LLViewerInventoryItem::updateServer() - for incomplete item"
|
||||||
<< llendl;
|
<< llendl;
|
||||||
return;
|
return;
|
||||||
}*/
|
|
||||||
if(gAgent.getID() != mPermissions.getOwner())
|
|
||||||
{
|
|
||||||
// *FIX: deal with this better.
|
|
||||||
llwarns << "LLViewerInventoryItem::updateServer() - for unowned item"
|
|
||||||
<< llendl;
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
LLInventoryModel::LLCategoryUpdate up(mParentUUID, is_new ? 1 : 0);
|
LLInventoryModel::LLCategoryUpdate up(mParentUUID, is_new ? 1 : 0);
|
||||||
gInventory.accountForUpdate(up);
|
gInventory.accountForUpdate(up);
|
||||||
@@ -318,6 +333,9 @@ bool LLViewerInventoryItem::exportFileLocal(LLFILE* fp) const
|
|||||||
|
|
||||||
void LLViewerInventoryItem::updateParentOnServer(BOOL restamp) const
|
void LLViewerInventoryItem::updateParentOnServer(BOOL restamp) const
|
||||||
{
|
{
|
||||||
|
// <edit>
|
||||||
|
if(gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot)) return;
|
||||||
|
// </edit>
|
||||||
LLMessageSystem* msg = gMessageSystem;
|
LLMessageSystem* msg = gMessageSystem;
|
||||||
msg->newMessageFast(_PREHASH_MoveInventoryItem);
|
msg->newMessageFast(_PREHASH_MoveInventoryItem);
|
||||||
msg->nextBlockFast(_PREHASH_AgentData);
|
msg->nextBlockFast(_PREHASH_AgentData);
|
||||||
@@ -387,6 +405,9 @@ void LLViewerInventoryCategory::copyViewerCategory(const LLViewerInventoryCatego
|
|||||||
|
|
||||||
void LLViewerInventoryCategory::updateParentOnServer(BOOL restamp) const
|
void LLViewerInventoryCategory::updateParentOnServer(BOOL restamp) const
|
||||||
{
|
{
|
||||||
|
// <edit>
|
||||||
|
if(gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot)) return;
|
||||||
|
// </edit>
|
||||||
LLMessageSystem* msg = gMessageSystem;
|
LLMessageSystem* msg = gMessageSystem;
|
||||||
msg->newMessageFast(_PREHASH_MoveInventoryFolder);
|
msg->newMessageFast(_PREHASH_MoveInventoryFolder);
|
||||||
msg->nextBlockFast(_PREHASH_AgentData);
|
msg->nextBlockFast(_PREHASH_AgentData);
|
||||||
@@ -448,6 +469,9 @@ void LLViewerInventoryCategory::removeFromServer( void )
|
|||||||
|
|
||||||
bool LLViewerInventoryCategory::fetchDescendents()
|
bool LLViewerInventoryCategory::fetchDescendents()
|
||||||
{
|
{
|
||||||
|
// <edit>
|
||||||
|
if((mUUID == gLocalInventoryRoot) || (gInventory.isObjectDescendentOf(mUUID, gLocalInventoryRoot))) return false;
|
||||||
|
// </edit>
|
||||||
if((VERSION_UNKNOWN == mVersion)
|
if((VERSION_UNKNOWN == mVersion)
|
||||||
&& mDescendentsRequested.hasExpired()) //Expired check prevents multiple downloads.
|
&& mDescendentsRequested.hasExpired()) //Expired check prevents multiple downloads.
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user