diff options
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index fadcd5e..d5c2fd4 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -358,14 +358,20 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
358 | bool asAttachment) | 358 | bool asAttachment) |
359 | { | 359 | { |
360 | CoalescedSceneObjects coa = new CoalescedSceneObjects(UUID.Zero); | 360 | CoalescedSceneObjects coa = new CoalescedSceneObjects(UUID.Zero); |
361 | // Dictionary<UUID, Vector3> originalPositions = new Dictionary<UUID, Vector3>(); | 361 | Dictionary<UUID, Vector3> originalPositions = new Dictionary<UUID, Vector3>(); |
362 | // this possible is not needed if keyframes are saved | ||
363 | Dictionary<UUID, KeyframeMotion> originalKeyframes = new Dictionary<UUID, KeyframeMotion>(); | ||
362 | 364 | ||
363 | foreach (SceneObjectGroup objectGroup in objlist) | 365 | foreach (SceneObjectGroup objectGroup in objlist) |
364 | { | 366 | { |
365 | if (objectGroup.RootPart.KeyframeMotion != null) | 367 | if (objectGroup.RootPart.KeyframeMotion != null) |
366 | objectGroup.RootPart.KeyframeMotion.Stop(); | 368 | { |
369 | objectGroup.RootPart.KeyframeMotion.Suspend(); | ||
370 | } | ||
367 | objectGroup.RootPart.SetForce(Vector3.Zero); | 371 | objectGroup.RootPart.SetForce(Vector3.Zero); |
368 | objectGroup.RootPart.SetAngularImpulse(Vector3.Zero, false); | 372 | objectGroup.RootPart.SetAngularImpulse(Vector3.Zero, false); |
373 | |||
374 | originalKeyframes[objectGroup.UUID] = objectGroup.RootPart.KeyframeMotion; | ||
369 | objectGroup.RootPart.KeyframeMotion = null; | 375 | objectGroup.RootPart.KeyframeMotion = null; |
370 | 376 | ||
371 | Vector3 inventoryStoredPosition = new Vector3 | 377 | Vector3 inventoryStoredPosition = new Vector3 |
@@ -427,9 +433,14 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
427 | else | 433 | else |
428 | itemXml = SceneObjectSerializer.ToOriginalXmlFormat(objlist[0], !asAttachment); | 434 | itemXml = SceneObjectSerializer.ToOriginalXmlFormat(objlist[0], !asAttachment); |
429 | 435 | ||
430 | // // Restore the position of each group now that it has been stored to inventory. | 436 | // Restore the position of each group now that it has been stored to inventory. |
431 | // foreach (SceneObjectGroup objectGroup in objlist) | 437 | foreach (SceneObjectGroup objectGroup in objlist) |
432 | // objectGroup.AbsolutePosition = originalPositions[objectGroup.UUID]; | 438 | { |
439 | objectGroup.AbsolutePosition = originalPositions[objectGroup.UUID]; | ||
440 | objectGroup.RootPart.KeyframeMotion = originalKeyframes[objectGroup.UUID]; | ||
441 | if (objectGroup.RootPart.KeyframeMotion != null) | ||
442 | objectGroup.RootPart.KeyframeMotion.Resume(); | ||
443 | } | ||
433 | 444 | ||
434 | InventoryItemBase item = CreateItemForObject(action, remoteClient, objlist[0], folderID); | 445 | InventoryItemBase item = CreateItemForObject(action, remoteClient, objlist[0], folderID); |
435 | 446 | ||