* Committing an extra bit of permissions for attaching to ensure that the perms are in line with project goals.

0.6.0-stable
Teravus Ovares 2008-05-08 19:22:20 +00:00
parent 08ec34e4d3
commit 4b924f2eb6
2 changed files with 39 additions and 35 deletions

View File

@ -425,10 +425,7 @@ namespace OpenSim.Framework
int totalLength = 1;
byte extraParamCount = data[i++];
if (extraParamCount > 0)
{
int foo = 0;
}
for (int k = 0; k < extraParamCount; k++)
{
ushort epType = Helpers.BytesToUInt16(data, i);

View File

@ -338,6 +338,7 @@ namespace OpenSim.Region.Environment.Scenes
public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, LLQuaternion rot)
{
// Calls attach with a Zero position
AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, LLVector3.Zero);
}
public void RezSingleAttachment(IClientAPI remoteClient, LLUUID itemID, uint AttachmentPt,uint ItemFlags, uint NextOwnerMask)
@ -393,7 +394,8 @@ namespace OpenSim.Region.Environment.Scenes
if (((SceneObjectGroup)obj).LocalId == objectLocalID)
{
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.
@ -433,6 +435,11 @@ namespace OpenSim.Region.Environment.Scenes
group.SetFromAssetID(newAssetID);
}
group.AttachToAgent(remoteClient.AgentId, AttachmentPt, attachPos);
}
else
{
remoteClient.SendAgentAlertMessage("You don't have sufficient permissions to attach this object", false);
}
}