Merge branch 'master' into careminster-presence-refactor

avinationmerge
Melanie 2010-06-09 20:25:05 +01:00
commit 1dce243661
3 changed files with 34 additions and 21 deletions

View File

@ -25,6 +25,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Reflection; using System.Reflection;
using System.Xml; using System.Xml;
@ -74,6 +75,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
{ {
m_log.Debug("[ATTACHMENTS MODULE]: Invoking AttachObject"); m_log.Debug("[ATTACHMENTS MODULE]: Invoking AttachObject");
try
{
// If we can't take it, we can't attach it! // If we can't take it, we can't attach it!
SceneObjectPart part = m_scene.GetSceneObjectPart(objectLocalID); SceneObjectPart part = m_scene.GetSceneObjectPart(objectLocalID);
if (part == null) if (part == null)
@ -99,6 +102,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
} }
} }
} }
catch (Exception e)
{
m_log.DebugFormat("[ATTACHMENTS MODULE]: exception upon Attach Object {0}", e);
}
}
public bool AttachObject( public bool AttachObject(
IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent) IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent)

View File

@ -1755,7 +1755,11 @@ namespace OpenSim.Region.Framework.Scenes
item.AssetType = asset.Type; item.AssetType = asset.Type;
item.InvType = (int)InventoryType.Object; item.InvType = (int)InventoryType.Object;
item.Folder = UUID.Zero; // Objects folder! InventoryFolderBase folder = InventoryService.GetFolderForType(remoteClient.AgentId, AssetType.Object);
if (folder != null)
item.Folder = folder.ID;
else // oopsies
item.Folder = UUID.Zero;
if ((remoteClient.AgentId != grp.RootPart.OwnerID) && Permissions.PropagatePermissions()) if ((remoteClient.AgentId != grp.RootPart.OwnerID) && Permissions.PropagatePermissions())
{ {

View File

@ -1206,6 +1206,7 @@ namespace OpenSim.Region.Framework.Scenes
return; return;
detachedpos = avatar.AbsolutePosition; detachedpos = avatar.AbsolutePosition;
RootPart.FromItemID = UUID.Zero;
AbsolutePosition = detachedpos; AbsolutePosition = detachedpos;
m_rootPart.AttachedAvatar = UUID.Zero; m_rootPart.AttachedAvatar = UUID.Zero;