diff options
-rw-r--r-- | OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 4c11135..a606d76 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -359,13 +359,19 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
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 |
@@ -425,7 +431,12 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
425 | 431 | ||
426 | // Restore the position of each group now that it has been stored to inventory. | 432 | // Restore the position of each group now that it has been stored to inventory. |
427 | foreach (SceneObjectGroup objectGroup in objlist) | 433 | foreach (SceneObjectGroup objectGroup in objlist) |
434 | { | ||
428 | objectGroup.AbsolutePosition = originalPositions[objectGroup.UUID]; | 435 | objectGroup.AbsolutePosition = originalPositions[objectGroup.UUID]; |
436 | objectGroup.RootPart.KeyframeMotion = originalKeyframes[objectGroup.UUID]; | ||
437 | if (objectGroup.RootPart.KeyframeMotion != null) | ||
438 | objectGroup.RootPart.KeyframeMotion.Resume(); | ||
439 | } | ||
429 | 440 | ||
430 | InventoryItemBase item = CreateItemForObject(action, remoteClient, objlist[0], folderID); | 441 | InventoryItemBase item = CreateItemForObject(action, remoteClient, objlist[0], folderID); |
431 | 442 | ||