aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SceneGraph.cs
diff options
context:
space:
mode:
authorMelanie2010-08-26 23:39:20 +0100
committerMelanie2010-08-26 23:39:20 +0100
commit1f1d72eba5ca2b1e4115e93af1ed88950dce585a (patch)
tree2dfcb626f9eb5fc6244b9fe7dac4b46a9c587703 /OpenSim/Region/Framework/Scenes/SceneGraph.cs
parentSend a null result search packet when no results are passsed in (diff)
parentMore on mantis #4985 (diff)
downloadopensim-SC-1f1d72eba5ca2b1e4115e93af1ed88950dce585a.zip
opensim-SC-1f1d72eba5ca2b1e4115e93af1ed88950dce585a.tar.gz
opensim-SC-1f1d72eba5ca2b1e4115e93af1ed88950dce585a.tar.bz2
opensim-SC-1f1d72eba5ca2b1e4115e93af1ed88950dce585a.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SceneGraph.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneGraph.cs39
1 files changed, 13 insertions, 26 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
index 1da4287..9db2691 100644
--- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs
@@ -1289,37 +1289,21 @@ namespace OpenSim.Region.Framework.Scenes
1289 /// <param name="localID"></param> 1289 /// <param name="localID"></param>
1290 /// <param name="pos"></param> 1290 /// <param name="pos"></param>
1291 /// <param name="remoteClient"></param> 1291 /// <param name="remoteClient"></param>
1292 protected internal void UpdatePrimPosition(uint localID, Vector3 pos, IClientAPI remoteClient) 1292 public void UpdatePrimPosition(uint localID, Vector3 pos, IClientAPI remoteClient)
1293 { 1293 {
1294 SceneObjectGroup group = GetGroupByPrim(localID); 1294 SceneObjectGroup group = GetGroupByPrim(localID);
1295
1295 if (group != null) 1296 if (group != null)
1296 { 1297 {
1297
1298 // Vector3 oldPos = group.AbsolutePosition;
1299 if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0)) 1298 if (group.IsAttachment || (group.RootPart.Shape.PCode == 9 && group.RootPart.Shape.State != 0))
1300 { 1299 {
1301 1300 if (m_parentScene.AttachmentsModule != null)
1302 // If this is an attachment, then we need to save the modified 1301 m_parentScene.AttachmentsModule.UpdateAttachmentPosition(remoteClient, group, pos);
1303 // object back into the avatar's inventory. First we save the
1304 // attachment point information, then we update the relative
1305 // positioning (which caused this method to get driven in the
1306 // first place. Then we have to mark the object as NOT an
1307 // attachment. This is necessary in order to correctly save
1308 // and retrieve GroupPosition information for the attachment.
1309 // Then we save the asset back into the appropriate inventory
1310 // entry. Finally, we restore the object's attachment status.
1311
1312 byte attachmentPoint = group.GetAttachmentPoint();
1313 group.UpdateGroupPosition(pos);
1314 group.RootPart.IsAttachment = false;
1315 group.AbsolutePosition = group.RootPart.AttachedPos;
1316 m_parentScene.UpdateKnownItem(remoteClient, group, group.GetFromItemID(), group.OwnerID);
1317 group.SetAttachmentPoint(attachmentPoint);
1318
1319 } 1302 }
1320 else 1303 else
1321 { 1304 {
1322 if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId) && m_parentScene.Permissions.CanObjectEntry(group.UUID, false, pos)) 1305 if (m_parentScene.Permissions.CanMoveObject(group.UUID, remoteClient.AgentId)
1306 && m_parentScene.Permissions.CanObjectEntry(group.UUID, false, pos))
1323 { 1307 {
1324 group.UpdateGroupPosition(pos); 1308 group.UpdateGroupPosition(pos);
1325 } 1309 }
@@ -1328,14 +1312,19 @@ namespace OpenSim.Region.Framework.Scenes
1328 } 1312 }
1329 1313
1330 /// <summary> 1314 /// <summary>
1331 /// 1315 /// Update the texture entry of the given prim.
1332 /// </summary> 1316 /// </summary>
1317 ///
1318 /// A texture entry is an object that contains details of all the textures of the prim's face. In this case,
1319 /// the texture is given in its byte serialized form.
1320 ///
1333 /// <param name="localID"></param> 1321 /// <param name="localID"></param>
1334 /// <param name="texture"></param> 1322 /// <param name="texture"></param>
1335 /// <param name="remoteClient"></param> 1323 /// <param name="remoteClient"></param>
1336 protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient) 1324 protected internal void UpdatePrimTexture(uint localID, byte[] texture, IClientAPI remoteClient)
1337 { 1325 {
1338 SceneObjectGroup group = GetGroupByPrim(localID); 1326 SceneObjectGroup group = GetGroupByPrim(localID);
1327
1339 if (group != null) 1328 if (group != null)
1340 { 1329 {
1341 if (m_parentScene.Permissions.CanEditObject(group.UUID,remoteClient.AgentId)) 1330 if (m_parentScene.Permissions.CanEditObject(group.UUID,remoteClient.AgentId))
@@ -1700,8 +1689,6 @@ namespace OpenSim.Region.Framework.Scenes
1700 SceneObjectPart newRoot = newSet[0]; 1689 SceneObjectPart newRoot = newSet[0];
1701 newSet.RemoveAt(0); 1690 newSet.RemoveAt(0);
1702 1691
1703 List<uint> linkIDs = new List<uint>();
1704
1705 foreach (SceneObjectPart newChild in newSet) 1692 foreach (SceneObjectPart newChild in newSet)
1706 newChild.UpdateFlag = 0; 1693 newChild.UpdateFlag = 0;
1707 1694