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 a84f966..388bc99 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 {
@@ -1146,10 +1147,7 @@ namespace OpenSim.Region.Framework.Scenes
1146 1147
1147 public int GetInaccurateNeighborCount() 1148 public int GetInaccurateNeighborCount()
1148 { 1149 {
1149 lock (m_neighbours) 1150 return m_neighbours.Count;
1150 {
1151 return m_neighbours.Count;
1152 }
1153 } 1151 }
1154 1152
1155 // This is the method that shuts down the scene. 1153 // This is the method that shuts down the scene.
@@ -1229,6 +1227,7 @@ namespace OpenSim.Region.Framework.Scenes
1229 m_worldCommModule = RequestModuleInterface<IWorldComm>(); 1227 m_worldCommModule = RequestModuleInterface<IWorldComm>();
1230 XferManager = RequestModuleInterface<IXfer>(); 1228 XferManager = RequestModuleInterface<IXfer>();
1231 m_AvatarFactory = RequestModuleInterface<IAvatarFactory>(); 1229 m_AvatarFactory = RequestModuleInterface<IAvatarFactory>();
1230 AttachmentsModule = RequestModuleInterface<IAttachmentsModule>();
1232 m_serialiser = RequestModuleInterface<IRegionSerialiserModule>(); 1231 m_serialiser = RequestModuleInterface<IRegionSerialiserModule>();
1233 m_dialogModule = RequestModuleInterface<IDialogModule>(); 1232 m_dialogModule = RequestModuleInterface<IDialogModule>();
1234 m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); 1233 m_capsModule = RequestModuleInterface<ICapabilitiesModule>();
@@ -2432,9 +2431,11 @@ namespace OpenSim.Region.Framework.Scenes
2432 //grp.SetFromAssetID(grp.RootPart.LastOwnerID); 2431 //grp.SetFromAssetID(grp.RootPart.LastOwnerID);
2433 m_log.DebugFormat( 2432 m_log.DebugFormat(
2434 "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); 2433 "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition);
2434
2435 if (AttachmentsModule != null)
2436 AttachmentsModule.AttachObject(
2437 sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false);
2435 2438
2436 AttachObject(
2437 sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false);
2438 RootPrim.RemFlag(PrimFlags.TemporaryOnRez); 2439 RootPrim.RemFlag(PrimFlags.TemporaryOnRez);
2439 grp.SendGroupFullUpdate(); 2440 grp.SendGroupFullUpdate();
2440 } 2441 }
@@ -2669,10 +2670,12 @@ namespace OpenSim.Region.Framework.Scenes
2669 public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) 2670 public virtual void SubscribeToClientAttachmentEvents(IClientAPI client)
2670 { 2671 {
2671 client.OnRezSingleAttachmentFromInv += RezSingleAttachment; 2672 client.OnRezSingleAttachmentFromInv += RezSingleAttachment;
2672 client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachments; 2673 client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachments;
2673 client.OnDetachAttachmentIntoInv += DetachSingleAttachmentToInv;
2674 client.OnObjectAttach += m_sceneGraph.AttachObject; 2674 client.OnObjectAttach += m_sceneGraph.AttachObject;
2675 client.OnObjectDetach += m_sceneGraph.DetachObject; 2675 client.OnObjectDetach += m_sceneGraph.DetachObject;
2676
2677 if (AttachmentsModule != null)
2678 client.OnDetachAttachmentIntoInv += AttachmentsModule.ShowDetachInUserInventory;
2676 } 2679 }
2677 2680
2678 public virtual void SubscribeToClientTeleportEvents(IClientAPI client) 2681 public virtual void SubscribeToClientTeleportEvents(IClientAPI client)
@@ -2719,8 +2722,7 @@ namespace OpenSim.Region.Framework.Scenes
2719 } 2722 }
2720 2723
2721 protected virtual void UnsubscribeToClientEvents(IClientAPI client) 2724 protected virtual void UnsubscribeToClientEvents(IClientAPI client)
2722 { 2725 {
2723
2724 } 2726 }
2725 2727
2726 /// <summary> 2728 /// <summary>
@@ -2742,7 +2744,6 @@ namespace OpenSim.Region.Framework.Scenes
2742 2744
2743 UnSubscribeToClientNetworkEvents(client); 2745 UnSubscribeToClientNetworkEvents(client);
2744 2746
2745
2746 // EventManager.TriggerOnNewClient(client); 2747 // EventManager.TriggerOnNewClient(client);
2747 } 2748 }
2748 2749
@@ -2822,12 +2823,14 @@ namespace OpenSim.Region.Framework.Scenes
2822 } 2823 }
2823 2824
2824 public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) 2825 public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client)
2825 { 2826 {
2826 client.OnRezSingleAttachmentFromInv -= RezSingleAttachment;
2827 client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachments; 2827 client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachments;
2828 client.OnDetachAttachmentIntoInv -= DetachSingleAttachmentToInv; 2828 client.OnRezSingleAttachmentFromInv -= RezSingleAttachment;
2829 client.OnObjectAttach -= m_sceneGraph.AttachObject; 2829 client.OnObjectAttach -= m_sceneGraph.AttachObject;
2830 client.OnObjectDetach -= m_sceneGraph.DetachObject; 2830 client.OnObjectDetach -= m_sceneGraph.DetachObject;
2831
2832 if (AttachmentsModule != null)
2833 client.OnDetachAttachmentIntoInv -= AttachmentsModule.ShowDetachInUserInventory;
2831 } 2834 }
2832 2835
2833 public virtual void UnSubscribeToClientTeleportEvents(IClientAPI client) 2836 public virtual void UnSubscribeToClientTeleportEvents(IClientAPI client)