aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs71
1 files changed, 0 insertions, 71 deletions
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
977 } 977 }
978 } 978 }
979 979
980 /// <summary>
981 /// Attach this scene object to the given avatar.
982 /// </summary>
983 /// <param name="agentID"></param>
984 /// <param name="attachmentpoint"></param>
985 /// <param name="AttachOffset"></param>
986 public void AttachToAgent(UUID agentID, uint attachmentpoint, Vector3 AttachOffset, bool silent)
987 {
988 ScenePresence avatar = m_scene.GetScenePresence(agentID);
989 if (avatar != null)
990 {
991 // don't attach attachments to child agents
992 if (avatar.IsChildAgent) return;
993
994// m_log.DebugFormat("[SOG]: Adding attachment {0} to avatar {1}", Name, avatar.Name);
995
996 DetachFromBackup();
997
998 // Remove from database and parcel prim count
999 m_scene.DeleteFromStorage(UUID);
1000 m_scene.EventManager.TriggerParcelPrimCountTainted();
1001
1002 m_rootPart.AttachedAvatar = agentID;
1003
1004 //Anakin Lohner bug #3839
1005 lock (m_parts)
1006 {
1007 foreach (SceneObjectPart p in m_parts.Values)
1008 {
1009 p.AttachedAvatar = agentID;
1010 }
1011 }
1012
1013 if (m_rootPart.PhysActor != null)
1014 {
1015 m_scene.PhysicsScene.RemovePrim(m_rootPart.PhysActor);
1016 m_rootPart.PhysActor = null;
1017 }
1018
1019 AbsolutePosition = AttachOffset;
1020 m_rootPart.AttachedPos = AttachOffset;
1021 m_rootPart.IsAttachment = true;
1022
1023 m_rootPart.SetParentLocalId(avatar.LocalId);
1024 SetAttachmentPoint(Convert.ToByte(attachmentpoint));
1025
1026 avatar.AddAttachment(this);
1027
1028 if (!silent)
1029 {
1030 // Killing it here will cause the client to deselect it
1031 // It then reappears on the avatar, deselected
1032 // through the full update below
1033 //
1034 if (IsSelected)
1035 {
1036 m_scene.SendKillObject(m_rootPart.LocalId);
1037 }
1038
1039 IsSelected = false; // fudge....
1040 ScheduleGroupForFullUpdate();
1041 }
1042 }
1043 else
1044 {
1045 m_log.WarnFormat(
1046 "[SOG]: Tried to add attachment {0} to avatar with UUID {1} in region {2} but the avatar is not present",
1047 UUID, agentID, Scene.RegionInfo.RegionName);
1048 }
1049 }
1050
1051 public byte GetAttachmentPoint() 980 public byte GetAttachmentPoint()
1052 { 981 {
1053 return m_rootPart.Shape.State; 982 return m_rootPart.Shape.State;