aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJohn Hurliman2010-03-12 14:40:21 -0800
committerJohn Hurliman2010-03-12 14:40:21 -0800
commit5beb08be3153575312b35401da95b7e8810c94df (patch)
tree03f9ebd4d6a4af160a4b3e320be49d0e0577dce3 /OpenSim/Region/CoreModules
parentMinor tweak to clean up SimianGrid asset service URLs (diff)
parentrefactor: move client invoked AttachObject from SceneGraph to AttachmentsModule (diff)
downloadopensim-SC_OLD-5beb08be3153575312b35401da95b7e8810c94df.zip
opensim-SC_OLD-5beb08be3153575312b35401da95b7e8810c94df.tar.gz
opensim-SC_OLD-5beb08be3153575312b35401da95b7e8810c94df.tar.bz2
opensim-SC_OLD-5beb08be3153575312b35401da95b7e8810c94df.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs32
-rw-r--r--OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml3
2 files changed, 34 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
index 3b7fe88..3c2cc42 100644
--- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs
@@ -67,6 +67,36 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
67 get { return false; } 67 get { return false; }
68 } 68 }
69 69
70 public void AttachObject(IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, bool silent)
71 {
72 m_log.Debug("[ATTACHMENTS MODULE]: Invoking AttachObject");
73
74 // If we can't take it, we can't attach it!
75 SceneObjectPart part = m_scene.GetSceneObjectPart(objectLocalID);
76 if (part == null)
77 return;
78
79 if (!m_scene.Permissions.CanTakeObject(part.UUID, remoteClient.AgentId))
80 return;
81
82 // Calls attach with a Zero position
83 if (AttachObject(remoteClient, objectLocalID, AttachmentPt, rot, Vector3.Zero, false))
84 {
85 m_scene.EventManager.TriggerOnAttach(objectLocalID, part.ParentGroup.GetFromItemID(), remoteClient.AgentId);
86
87 // Save avatar attachment information
88 ScenePresence presence;
89 if (m_scene.AvatarFactory != null && m_scene.TryGetAvatar(remoteClient.AgentId, out presence))
90 {
91 m_log.Info(
92 "[ATTACHMENTS MODULE]: Saving avatar attachment. AgentID: " + remoteClient.AgentId
93 + ", AttachmentPoint: " + AttachmentPt);
94
95 m_scene.AvatarFactory.UpdateDatabase(remoteClient.AgentId, presence.Appearance);
96 }
97 }
98 }
99
70 public bool AttachObject( 100 public bool AttachObject(
71 IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent) 101 IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, Quaternion rot, Vector3 attachPos, bool silent)
72 { 102 {
@@ -143,7 +173,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
143 SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt) 173 SceneObjectGroup att, IClientAPI remoteClient, UUID itemID, uint AttachmentPt)
144 { 174 {
145 m_log.DebugFormat( 175 m_log.DebugFormat(
146 "[ATTACHMENTS MODULEY]: Updating inventory of {0} to show attachment of {1} (item ID {2})", 176 "[ATTACHMENTS MODULE]: Updating inventory of {0} to show attachment of {1} (item ID {2})",
147 remoteClient.Name, att.Name, itemID); 177 remoteClient.Name, att.Name, itemID);
148 178
149 if (!att.IsDeleted) 179 if (!att.IsDeleted)
diff --git a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
index 0195c03..aaa318c 100644
--- a/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
+++ b/OpenSim/Region/CoreModules/Resources/CoreModulePlugin.addin.xml
@@ -56,6 +56,9 @@
56 <RegionModule id="RemotePresenceServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.RemotePresenceServicesConnector" /> 56 <RegionModule id="RemotePresenceServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence.RemotePresenceServicesConnector" />
57 <RegionModule id="LocalUserAccountServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts.LocalUserAccountServicesConnector" /> 57 <RegionModule id="LocalUserAccountServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts.LocalUserAccountServicesConnector" />
58 <RegionModule id="RemoteUserAccountServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts.RemoteUserAccountServicesConnector" /> 58 <RegionModule id="RemoteUserAccountServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.UserAccounts.RemoteUserAccountServicesConnector" />
59
60 <RegionModule id="LocalGridUserServicesConnector" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser.LocalGridUserServicesConnector" />
61
59 <RegionModule id="LocalSimulationConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation.LocalSimulationConnectorModule" /> 62 <RegionModule id="LocalSimulationConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation.LocalSimulationConnectorModule" />
60 <RegionModule id="RemoteSimulationConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation.RemoteSimulationConnectorModule" /> 63 <RegionModule id="RemoteSimulationConnectorModule" type="OpenSim.Region.CoreModules.ServiceConnectorsOut.Simulation.RemoteSimulationConnectorModule" />
61 <!-- Service connectors IN modules --> 64 <!-- Service connectors IN modules -->