From 60553e62a3f576b8bf6ab88a83b2d4550bd69d2b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 5 Mar 2010 23:18:47 +0000 Subject: refactor: begin to move attachments code into a region module --- OpenSim/Region/Framework/Scenes/Scene.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs') diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index a880fe7..c83132f 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -307,6 +307,7 @@ namespace OpenSim.Region.Framework.Scenes protected IXMLRPC m_xmlrpcModule; protected IWorldComm m_worldCommModule; + public IAttachmentsModule AttachmentsModule { get; set; } protected IAvatarFactory m_AvatarFactory; public IAvatarFactory AvatarFactory { @@ -1215,6 +1216,7 @@ namespace OpenSim.Region.Framework.Scenes m_worldCommModule = RequestModuleInterface(); XferManager = RequestModuleInterface(); m_AvatarFactory = RequestModuleInterface(); + AttachmentsModule = RequestModuleInterface(); m_serialiser = RequestModuleInterface(); m_dialogModule = RequestModuleInterface(); m_capsModule = RequestModuleInterface(); @@ -2405,9 +2407,11 @@ namespace OpenSim.Region.Framework.Scenes //grp.SetFromAssetID(grp.RootPart.LastOwnerID); m_log.DebugFormat( "[ATTACHMENT]: Attach to avatar {0} at position {1}", sp.UUID, grp.AbsolutePosition); + + if (AttachmentsModule != null) + AttachmentsModule.AttachObject( + sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); - AttachObject( - sp.ControllingClient, grp.LocalId, (uint)0, grp.GroupRotation, grp.AbsolutePosition, false); RootPrim.RemFlag(PrimFlags.TemporaryOnRez); grp.SendGroupFullUpdate(); } -- cgit v1.1