* Committing an extra bit of permissions for attaching to ensure that the perms are in line with project goals.
parent
08ec34e4d3
commit
4b924f2eb6
|
@ -425,10 +425,7 @@ namespace OpenSim.Framework
|
||||||
int totalLength = 1;
|
int totalLength = 1;
|
||||||
byte extraParamCount = data[i++];
|
byte extraParamCount = data[i++];
|
||||||
|
|
||||||
if (extraParamCount > 0)
|
|
||||||
{
|
|
||||||
int foo = 0;
|
|
||||||
}
|
|
||||||
for (int k = 0; k < extraParamCount; k++)
|
for (int k = 0; k < extraParamCount; k++)
|
||||||
{
|
{
|
||||||
ushort epType = Helpers.BytesToUInt16(data, i);
|
ushort epType = Helpers.BytesToUInt16(data, i);
|
||||||
|
|
|
@ -338,6 +338,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot)
|
public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot)
|
||||||
{
|
{
|
||||||
// Calls attach with a Zero position
|
// Calls attach with a Zero position
|
||||||
|
|
||||||
AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero);
|
AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero);
|
||||||
}
|
}
|
||||||
public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask)
|
public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask)
|
||||||
|
@ -393,46 +394,52 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
if (((SceneObjectGroup)obj).LocalId == objectLocalID)
|
if (((SceneObjectGroup)obj).LocalId == objectLocalID)
|
||||||
{
|
{
|
||||||
SceneObjectGroup group = (SceneObjectGroup)obj;
|
SceneObjectGroup group = (SceneObjectGroup)obj;
|
||||||
|
if (m_parentScene.Permissions.CanEditObject(remoteClient.AgentId, obj.UUID))
|
||||||
// If the attachment point isn't the same as the one previously used
|
|
||||||
// set it's offset position = 0 so that it appears on the attachment point
|
|
||||||
// and not in a weird location somewhere unknown.
|
|
||||||
if (AttachmentPt != 0 && AttachmentPt != (uint)group.GetAttachmentPoint())
|
|
||||||
{
|
{
|
||||||
|
// If the attachment point isn't the same as the one previously used
|
||||||
|
// set it's offset position = 0 so that it appears on the attachment point
|
||||||
|
// and not in a weird location somewhere unknown.
|
||||||
|
if (AttachmentPt != 0 && AttachmentPt != (uint)group.GetAttachmentPoint())
|
||||||
|
{
|
||||||
|
|
||||||
attachPos = LLVector3.Zero;
|
attachPos = LLVector3.Zero;
|
||||||
}
|
}
|
||||||
|
|
||||||
// AttachmentPt 0 means the client chose to 'wear' the attachment.
|
// AttachmentPt 0 means the client chose to 'wear' the attachment.
|
||||||
if (AttachmentPt == 0)
|
if (AttachmentPt == 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Check object for stored attachment point
|
|
||||||
AttachmentPt = (uint)group.GetAttachmentPoint();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
// Check object for stored attachment point
|
||||||
|
AttachmentPt = (uint)group.GetAttachmentPoint();
|
||||||
|
|
||||||
// if we still didn't find a suitable attachment point.......
|
|
||||||
if (AttachmentPt == 0)
|
}
|
||||||
{
|
|
||||||
// Stick it on left hand with Zero Offset from the attachment point.
|
// if we still didn't find a suitable attachment point.......
|
||||||
AttachmentPt = (uint)AttachmentPoint.LeftHand;
|
if (AttachmentPt == 0)
|
||||||
attachPos = LLVector3.Zero;
|
{
|
||||||
}
|
// Stick it on left hand with Zero Offset from the attachment point.
|
||||||
|
AttachmentPt = (uint)AttachmentPoint.LeftHand;
|
||||||
|
attachPos = LLVector3.Zero;
|
||||||
|
}
|
||||||
m_log.Debug("[ATTACH]: Using attachpoint: " + AttachmentPt.ToString());
|
m_log.Debug("[ATTACH]: Using attachpoint: " + AttachmentPt.ToString());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Saves and gets assetID
|
|
||||||
if (group.GetFromAssetID() == LLUUID.Zero)
|
|
||||||
{
|
|
||||||
LLUUID newAssetID = m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId);
|
|
||||||
|
|
||||||
// sets assetID so client can show asset as 'attached' in inventory
|
|
||||||
group.SetFromAssetID(newAssetID);
|
// Saves and gets assetID
|
||||||
|
if (group.GetFromAssetID() == LLUUID.Zero)
|
||||||
|
{
|
||||||
|
LLUUID newAssetID = m_parentScene.attachObjectAssetStore(remoteClient, group, remoteClient.AgentId);
|
||||||
|
|
||||||
|
// sets assetID so client can show asset as 'attached' in inventory
|
||||||
|
group.SetFromAssetID(newAssetID);
|
||||||
|
}
|
||||||
|
group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
remoteClient.SendAgentAlertMessage("You don't have sufficient permissions to attach this object", false);
|
||||||
}
|
}
|
||||||
group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue