aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs31
1 files changed, 17 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index a880fe7..30c69a8 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -307,6 +307,7 @@ namespace OpenSim.Region.Framework.Scenes
307 307
308 protected IXMLRPC m_xmlrpcModule; 308 protected IXMLRPC m_xmlrpcModule;
309 protected IWorldComm m_worldCommModule; 309 protected IWorldComm m_worldCommModule;
310 public IAttachmentsModule AttachmentsModule { get; set; }
310 protected IAvatarFactory m_AvatarFactory; 311 protected IAvatarFactory m_AvatarFactory;
311 public IAvatarFactory AvatarFactory 312 public IAvatarFactory AvatarFactory
312 { 313 {
@@ -1132,10 +1133,7 @@ namespace OpenSim.Region.Framework.Scenes
1132 1133
1133 public int GetInaccurateNeighborCount() 1134 public int GetInaccurateNeighborCount()
1134 { 1135 {
1135 lock (m_neighbours) 1136 return m_neighbours.Count;
1136 {
1137 return m_neighbours.Count;
1138 }
1139 } 1137 }
1140 1138
1141 // This is the method that shuts down the scene. 1139 // This is the method that shuts down the scene.
@@ -1215,6 +1213,7 @@ namespace OpenSim.Region.Framework.Scenes
1215 m_worldCommModule = RequestModuleInterface<IWorldComm>(); 1213 m_worldCommModule = RequestModuleInterface<IWorldComm>();
1216 XferManager = RequestModuleInterface<IXfer>(); 1214 XferManager = RequestModuleInterface<IXfer>();
1217 m_AvatarFactory = RequestModuleInterface<IAvatarFactory>(); 1215 m_AvatarFactory = RequestModuleInterface<IAvatarFactory>();
1216 AttachmentsModule = RequestModuleInterface<IAttachmentsModule>();
1218 m_serialiser = RequestModuleInterface<IRegionSerialiserModule>(); 1217 m_serialiser = RequestModuleInterface<IRegionSerialiserModule>();
1219 m_dialogModule = RequestModuleInterface<IDialogModule>(); 1218 m_dialogModule = RequestModuleInterface<IDialogModule>();
1220 m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); 1219 m_capsModule = RequestModuleInterface<ICapabilitiesModule>();
@@ -2405,9 +2404,11 @@ namespace OpenSim.Region.Framework.Scenes
2405 //grp.SetFromAssetID(grp.RootPart.LastOwnerID); 2404 //grp.SetFromAssetID(grp.RootPart.LastOwnerID);
2406 m_log.DebugFormat( 2405 m_log.DebugFormat(
2407 "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); 2406 "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition);
2407
2408 if (AttachmentsModule != null)
2409 AttachmentsModule.AttachObject(
2410 sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false);
2408 2411
2409 AttachObject(
2410 sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false);
2411 RootPrim.RemFlag(PrimFlags.TemporaryOnRez); 2412 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
2412 grp.SendGroupFullUpdate(); 2413 grp.SendGroupFullUpdate();
2413 } 2414 }
@@ -2642,10 +2643,12 @@ namespace OpenSim.Region.Framework.Scenes
2642 public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) 2643 public virtual void SubscribeToClientAttachmentEvents(IClientAPI client)
2643 { 2644 {
2644 client.OnRezSingleAttachmentFromInv += RezSingleAttachment; 2645 client.OnRezSingleAttachmentFromInv += RezSingleAttachment;
2645 client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachments; 2646 client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachments;
2646 client.OnDetachAttachmentIntoInv += DetachSingleAttachmentToInv;
2647 client.OnObjectAttach += m_sceneGraph.AttachObject; 2647 client.OnObjectAttach += m_sceneGraph.AttachObject;
2648 client.OnObjectDetach += m_sceneGraph.DetachObject; 2648 client.OnObjectDetach += m_sceneGraph.DetachObject;
2649
2650 if (AttachmentsModule != null)
2651 client.OnDetachAttachmentIntoInv += AttachmentsModule.ShowDetachInUserInventory;
2649 } 2652 }
2650 2653
2651 public virtual void SubscribeToClientTeleportEvents(IClientAPI client) 2654 public virtual void SubscribeToClientTeleportEvents(IClientAPI client)
@@ -2692,8 +2695,7 @@ namespace OpenSim.Region.Framework.Scenes
2692 } 2695 }
2693 2696
2694 protected virtual void UnsubscribeToClientEvents(IClientAPI client) 2697 protected virtual void UnsubscribeToClientEvents(IClientAPI client)
2695 { 2698 {
2696
2697 } 2699 }
2698 2700
2699 /// <summary> 2701 /// <summary>
@@ -2715,7 +2717,6 @@ namespace OpenSim.Region.Framework.Scenes
2715 2717
2716 UnSubscribeToClientNetworkEvents(client); 2718 UnSubscribeToClientNetworkEvents(client);
2717 2719
2718
2719 // EventManager.TriggerOnNewClient(client); 2720 // EventManager.TriggerOnNewClient(client);
2720 } 2721 }
2721 2722
@@ -2795,12 +2796,14 @@ namespace OpenSim.Region.Framework.Scenes
2795 } 2796 }
2796 2797
2797 public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) 2798 public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client)
2798 { 2799 {
2799 client.OnRezSingleAttachmentFromInv -= RezSingleAttachment;
2800 client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachments; 2800 client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachments;
2801 client.OnDetachAttachmentIntoInv -= DetachSingleAttachmentToInv; 2801 client.OnRezSingleAttachmentFromInv -= RezSingleAttachment;
2802 client.OnObjectAttach -= m_sceneGraph.AttachObject; 2802 client.OnObjectAttach -= m_sceneGraph.AttachObject;
2803 client.OnObjectDetach -= m_sceneGraph.DetachObject; 2803 client.OnObjectDetach -= m_sceneGraph.DetachObject;
2804
2805 if (AttachmentsModule != null)
2806 client.OnDetachAttachmentIntoInv -= AttachmentsModule.ShowDetachInUserInventory;
2804 } 2807 }
2805 2808
2806 public virtual void UnSubscribeToClientTeleportEvents(IClientAPI client) 2809 public virtual void UnSubscribeToClientTeleportEvents(IClientAPI client)