aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs31
1 files changed, 8 insertions, 23 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 96f1198..e5373c3 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -399,13 +399,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
399 DeRezAction action, UUID folderID, List<SceneObjectGroup> objlist, IClientAPI remoteClient, 399 DeRezAction action, UUID folderID, List<SceneObjectGroup> objlist, IClientAPI remoteClient,
400 bool asAttachment) 400 bool asAttachment)
401 { 401 {
402 CoalescedSceneObjects coa = new CoalescedSceneObjects(UUID.Zero); 402 CoalescedSceneObjects coa = new CoalescedSceneObjects(UUID.Zero);
403 Dictionary<UUID, Vector3> originalPositions = new Dictionary<UUID, Vector3>(); 403 Dictionary<UUID, Vector3> originalPositions = new Dictionary<UUID, Vector3>();
404 Dictionary<UUID, Quaternion> originalRotations = new Dictionary<UUID, Quaternion>();
404 // this possible is not needed if keyframes are saved 405 // this possible is not needed if keyframes are saved
405 Dictionary<UUID, KeyframeMotion> originalKeyframes = new Dictionary<UUID, KeyframeMotion>(); 406 Dictionary<UUID, KeyframeMotion> originalKeyframes = new Dictionary<UUID, KeyframeMotion>();
406 407
407 Dictionary<SceneObjectGroup, KeyframeMotion> group2Keyframe = new Dictionary<SceneObjectGroup, KeyframeMotion>();
408
409 foreach (SceneObjectGroup objectGroup in objlist) 408 foreach (SceneObjectGroup objectGroup in objlist)
410 { 409 {
411 if (objectGroup.RootPart.KeyframeMotion != null) 410 if (objectGroup.RootPart.KeyframeMotion != null)
@@ -418,18 +417,10 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
418 originalKeyframes[objectGroup.UUID] = objectGroup.RootPart.KeyframeMotion; 417 originalKeyframes[objectGroup.UUID] = objectGroup.RootPart.KeyframeMotion;
419 objectGroup.RootPart.KeyframeMotion = null; 418 objectGroup.RootPart.KeyframeMotion = null;
420 419
421 Vector3 inventoryStoredPosition = new Vector3 420 Vector3 inventoryStoredPosition = objectGroup.AbsolutePosition;
422 (((objectGroup.AbsolutePosition.X > (int)Constants.RegionSize) 421 originalPositions[objectGroup.UUID] = inventoryStoredPosition;
423 ? 250
424 : objectGroup.AbsolutePosition.X)
425 ,
426 (objectGroup.AbsolutePosition.Y > (int)Constants.RegionSize)
427 ? 250
428 : objectGroup.AbsolutePosition.Y,
429 objectGroup.AbsolutePosition.Z);
430
431 Quaternion inventoryStoredRotation = objectGroup.GroupRotation; 422 Quaternion inventoryStoredRotation = objectGroup.GroupRotation;
432 originalPositions[objectGroup.UUID] = objectGroup.AbsolutePosition; 423 originalRotations[objectGroup.UUID] = inventoryStoredRotation;
433 424
434 // Restore attachment data after trip through the sim 425 // Restore attachment data after trip through the sim
435 if (objectGroup.RootPart.AttachPoint > 0) 426 if (objectGroup.RootPart.AttachPoint > 0)
@@ -481,6 +472,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
481 foreach (SceneObjectGroup objectGroup in objlist) 472 foreach (SceneObjectGroup objectGroup in objlist)
482 { 473 {
483 objectGroup.AbsolutePosition = originalPositions[objectGroup.UUID]; 474 objectGroup.AbsolutePosition = originalPositions[objectGroup.UUID];
475 objectGroup.RootPart.RotationOffset = originalRotations[objectGroup.UUID];
484 objectGroup.RootPart.KeyframeMotion = originalKeyframes[objectGroup.UUID]; 476 objectGroup.RootPart.KeyframeMotion = originalKeyframes[objectGroup.UUID];
485 if (objectGroup.RootPart.KeyframeMotion != null) 477 if (objectGroup.RootPart.KeyframeMotion != null)
486 objectGroup.RootPart.KeyframeMotion.Resume(); 478 objectGroup.RootPart.KeyframeMotion.Resume();
@@ -563,13 +555,6 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
563 } 555 }
564 } 556 }
565 557
566 // Restore KeyframeMotion
567 foreach (SceneObjectGroup objectGroup in group2Keyframe.Keys)
568 {
569 objectGroup.RootPart.KeyframeMotion = group2Keyframe[objectGroup];
570 objectGroup.RootPart.KeyframeMotion.Start();
571 }
572
573 // This is a hook to do some per-asset post-processing for subclasses that need that 558 // This is a hook to do some per-asset post-processing for subclasses that need that
574 if (remoteClient != null) 559 if (remoteClient != null)
575 ExportAsset(remoteClient.AgentId, asset.FullID); 560 ExportAsset(remoteClient.AgentId, asset.FullID);
@@ -993,7 +978,7 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
993 // one full update during the attachment 978 // one full update during the attachment
994 // process causes some clients to fail to display the 979 // process causes some clients to fail to display the
995 // attachment properly. 980 // attachment properly.
996 m_Scene.AddNewSceneObject(group, !attachment, false); 981 m_Scene.AddNewSceneObject(group, true, false);
997 982
998 // if attachment we set it's asset id so object updates 983 // if attachment we set it's asset id so object updates
999 // can reflect that, if not, we set it's position in world. 984 // can reflect that, if not, we set it's position in world.