From b9f5cd75bc9b46b067d151a1a13d4e95cc98cedb Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 12 Mar 2010 22:39:15 +0000
Subject: refactor: move client invoked AttachObject from SceneGraph to
AttachmentsModule
---
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 35 ---------------------------
1 file changed, 35 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 380722d..a88d456 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -487,41 +487,6 @@ namespace OpenSim.Region.Framework.Scenes
}
///
- /// Event Handling routine for Attach Object
- ///
- ///
- ///
- ///
- ///
- protected internal void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, bool silent)
- {
- // If we can't take it, we can't attach it!
- SceneObjectPart part = m_parentScene.GetSceneObjectPart(objectLocalID);
- if (part == null)
- return;
-
- if (!m_parentScene.Permissions.CanTakeObject(part.UUID, remoteClient.AgentId))
- return;
-
- // Calls attach with a Zero position
- if (m_parentScene.AttachmentsModule.AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, Vector3.Zero, false))
- {
- m_parentScene.SendAttachEvent(objectLocalID, part.ParentGroup.GetFromItemID(), remoteClient.AgentId);
-
- // Save avatar attachment information
- ScenePresence presence;
- if (m_parentScene.AvatarFactory != null && m_parentScene.TryGetAvatar(remoteClient.AgentId, out presence))
- {
- m_log.Info(
- "[SCENE]: Saving avatar attachment. AgentID: " + remoteClient.AgentId
- + ", AttachmentPoint: " + AttachmentPt);
-
- m_parentScene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
- }
- }
- }
-
- ///
/// Rez an attachment
///
///
--
cgit v1.1
From 582375509c82220c40579c4e4095225bd9d67010 Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Fri, 12 Mar 2010 22:48:49 +0000
Subject: refactor: move RezSingleAttachmentFromInventory() from SceneGraph to
AttachmentsModule
---
OpenSim/Region/Framework/Scenes/SceneGraph.cs | 53 ---------------------------
1 file changed, 53 deletions(-)
(limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index a88d456..d944834 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -486,59 +486,6 @@ namespace OpenSim.Region.Framework.Scenes
}
}
- ///
- /// Rez an attachment
- ///
- ///
- ///
- ///
- /// The scene object that was attached. Null if the scene object could not be found
- public SceneObjectGroup RezSingleAttachment(IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
- {
- IInventoryAccessModule invAccess = m_parentScene.RequestModuleInterface();
- if (invAccess != null)
- {
- SceneObjectGroup objatt = invAccess.RezObject(remoteClient,
- itemID, Vector3.Zero, Vector3.Zero, UUID.Zero, (byte)1, true,
- false, false, remoteClient.AgentId, true);
-
-// m_log.DebugFormat(
-// "[SCENE GRAPH]: Retrieved single object {0} for attachment to {1} on point {2}",
-// objatt.Name, remoteClient.Name, AttachmentPt);
-
- if (objatt != null)
- {
- bool tainted = false;
- if (AttachmentPt != 0 && AttachmentPt != objatt.GetAttachmentPoint())
- tainted = true;
-
- m_parentScene.AttachmentsModule.AttachObject(
- remoteClient, objatt.LocalId, AttachmentPt, Quaternion.Identity, objatt.AbsolutePosition, false);
- //objatt.ScheduleGroupForFullUpdate();
-
- if (tainted)
- objatt.HasGroupChanged = true;
-
- // Fire after attach, so we don't get messy perms dialogs
- // 3 == AttachedRez
- objatt.CreateScriptInstances(0, true, m_parentScene.DefaultScriptEngine, 3);
-
- // Do this last so that event listeners have access to all the effects of the attachment
- m_parentScene.EventManager.TriggerOnAttach(objatt.LocalId, itemID, remoteClient.AgentId);
- }
- else
- {
- m_log.WarnFormat(
- "[SCENE GRAPH]: Could not retrieve item {0} for attaching to avatar {1} at point {2}",
- itemID, remoteClient.Name, AttachmentPt);
- }
-
- return objatt;
- }
-
- return null;
- }
-
protected internal ScenePresence CreateAndAddChildScenePresence(IClientAPI client, AvatarAppearance appearance)
{
ScenePresence newAvatar = null;
--
cgit v1.1