diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 8f9663c..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 | { |
@@ -1212,6 +1213,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1212 | m_worldCommModule = RequestModuleInterface<IWorldComm>(); | 1213 | m_worldCommModule = RequestModuleInterface<IWorldComm>(); |
1213 | XferManager = RequestModuleInterface<IXfer>(); | 1214 | XferManager = RequestModuleInterface<IXfer>(); |
1214 | m_AvatarFactory = RequestModuleInterface<IAvatarFactory>(); | 1215 | m_AvatarFactory = RequestModuleInterface<IAvatarFactory>(); |
1216 | AttachmentsModule = RequestModuleInterface<IAttachmentsModule>(); | ||
1215 | m_serialiser = RequestModuleInterface<IRegionSerialiserModule>(); | 1217 | m_serialiser = RequestModuleInterface<IRegionSerialiserModule>(); |
1216 | m_dialogModule = RequestModuleInterface<IDialogModule>(); | 1218 | m_dialogModule = RequestModuleInterface<IDialogModule>(); |
1217 | m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); | 1219 | m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); |
@@ -2402,9 +2404,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2402 | //grp.SetFromAssetID(grp.RootPart.LastOwnerID); | 2404 | //grp.SetFromAssetID(grp.RootPart.LastOwnerID); |
2403 | m_log.DebugFormat( | 2405 | m_log.DebugFormat( |
2404 | "[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); | ||
2405 | 2411 | ||
2406 | AttachObject( | ||
2407 | sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); | ||
2408 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); | 2412 | RootPrim.RemFlag(PrimFlags.TemporaryOnRez); |
2409 | grp.SendGroupFullUpdate(); | 2413 | grp.SendGroupFullUpdate(); |
2410 | } | 2414 | } |
@@ -2639,10 +2643,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
2639 | public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) | 2643 | public virtual void SubscribeToClientAttachmentEvents(IClientAPI client) |
2640 | { | 2644 | { |
2641 | client.OnRezSingleAttachmentFromInv += RezSingleAttachment; | 2645 | client.OnRezSingleAttachmentFromInv += RezSingleAttachment; |
2642 | client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachments; | 2646 | client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachments; |
2643 | client.OnDetachAttachmentIntoInv += DetachSingleAttachmentToInv; | ||
2644 | client.OnObjectAttach += m_sceneGraph.AttachObject; | 2647 | client.OnObjectAttach += m_sceneGraph.AttachObject; |
2645 | client.OnObjectDetach += m_sceneGraph.DetachObject; | 2648 | client.OnObjectDetach += m_sceneGraph.DetachObject; |
2649 | |||
2650 | if (AttachmentsModule != null) | ||
2651 | client.OnDetachAttachmentIntoInv += AttachmentsModule.ShowDetachInUserInventory; | ||
2646 | } | 2652 | } |
2647 | 2653 | ||
2648 | public virtual void SubscribeToClientTeleportEvents(IClientAPI client) | 2654 | public virtual void SubscribeToClientTeleportEvents(IClientAPI client) |
@@ -2689,8 +2695,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2689 | } | 2695 | } |
2690 | 2696 | ||
2691 | protected virtual void UnsubscribeToClientEvents(IClientAPI client) | 2697 | protected virtual void UnsubscribeToClientEvents(IClientAPI client) |
2692 | { | 2698 | { |
2693 | |||
2694 | } | 2699 | } |
2695 | 2700 | ||
2696 | /// <summary> | 2701 | /// <summary> |
@@ -2712,7 +2717,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
2712 | 2717 | ||
2713 | UnSubscribeToClientNetworkEvents(client); | 2718 | UnSubscribeToClientNetworkEvents(client); |
2714 | 2719 | ||
2715 | |||
2716 | // EventManager.TriggerOnNewClient(client); | 2720 | // EventManager.TriggerOnNewClient(client); |
2717 | } | 2721 | } |
2718 | 2722 | ||
@@ -2792,12 +2796,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
2792 | } | 2796 | } |
2793 | 2797 | ||
2794 | public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) | 2798 | public virtual void UnSubscribeToClientAttachmentEvents(IClientAPI client) |
2795 | { | 2799 | { |
2796 | client.OnRezSingleAttachmentFromInv -= RezSingleAttachment; | ||
2797 | client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachments; | 2800 | client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachments; |
2798 | client.OnDetachAttachmentIntoInv -= DetachSingleAttachmentToInv; | 2801 | client.OnRezSingleAttachmentFromInv -= RezSingleAttachment; |
2799 | client.OnObjectAttach -= m_sceneGraph.AttachObject; | 2802 | client.OnObjectAttach -= m_sceneGraph.AttachObject; |
2800 | client.OnObjectDetach -= m_sceneGraph.DetachObject; | 2803 | client.OnObjectDetach -= m_sceneGraph.DetachObject; |
2804 | |||
2805 | if (AttachmentsModule != null) | ||
2806 | client.OnDetachAttachmentIntoInv -= AttachmentsModule.ShowDetachInUserInventory; | ||
2801 | } | 2807 | } |
2802 | 2808 | ||
2803 | public virtual void UnSubscribeToClientTeleportEvents(IClientAPI client) | 2809 | public virtual void UnSubscribeToClientTeleportEvents(IClientAPI client) |