From 6cbf66827ba3cb878ab70b75fc4e3221b71d820e Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 1 Sep 2010 01:11:52 +0100
Subject: refactor: move SOG.AttachToAgent() into AttachmentsModule
---
.../Region/Framework/Scenes/SceneObjectGroup.cs | 71 ----------------------
1 file changed, 71 deletions(-)
(limited to 'OpenSim/Region/Framework')
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
index 40a8f83..64a6dd5 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
@@ -977,77 +977,6 @@ namespace OpenSim.Region.Framework.Scenes
}
}
- ///
- /// Attach this scene object to the given avatar.
- ///
- ///
- ///
- ///
- public void AttachToAgent(UUID agentID, uint attachmentpoint, Vector3 AttachOffset, bool silent)
- {
- ScenePresence avatar = m_scene.GetScenePresence(agentID);
- if (avatar != null)
- {
- // don't attach attachments to child agents
- if (avatar.IsChildAgent) return;
-
-// m_log.DebugFormat("[SOG]: Adding attachment {0} to avatar {1}", Name, avatar.Name);
-
- DetachFromBackup();
-
- // Remove from database and parcel prim count
- m_scene.DeleteFromStorage(UUID);
- m_scene.EventManager.TriggerParcelPrimCountTainted();
-
- m_rootPart.AttachedAvatar = agentID;
-
- //Anakin Lohner bug #3839
- lock (m_parts)
- {
- foreach (SceneObjectPart p in m_parts.Values)
- {
- p.AttachedAvatar = agentID;
- }
- }
-
- if (m_rootPart.PhysActor != null)
- {
- m_scene.PhysicsScene.RemovePrim(m_rootPart.PhysActor);
- m_rootPart.PhysActor = null;
- }
-
- AbsolutePosition = AttachOffset;
- m_rootPart.AttachedPos = AttachOffset;
- m_rootPart.IsAttachment = true;
-
- m_rootPart.SetParentLocalId(avatar.LocalId);
- SetAttachmentPoint(Convert.ToByte(attachmentpoint));
-
- avatar.AddAttachment(this);
-
- if (!silent)
- {
- // Killing it here will cause the client to deselect it
- // It then reappears on the avatar, deselected
- // through the full update below
- //
- if (IsSelected)
- {
- m_scene.SendKillObject(m_rootPart.LocalId);
- }
-
- IsSelected = false; // fudge....
- ScheduleGroupForFullUpdate();
- }
- }
- else
- {
- m_log.WarnFormat(
- "[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present",
- UUID, agentID, Scene.RegionInfo.RegionName);
- }
- }
-
public byte GetAttachmentPoint()
{
return m_rootPart.Shape.State;
--
cgit v1.1