aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorOren Hurvitz2013-11-25 19:22:53 +0200
committerJustin Clark-Casey (justincc)2014-03-11 00:43:22 +0000
commit120f872d2b2f58560ab026f35a9f523e8540d2c6 (patch)
tree40cc745e9d8c06a31b1ac0027577bda50bcbbc07 /OpenSim/Region
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC-120f872d2b2f58560ab026f35a9f523e8540d2c6.zip
opensim-SC-120f872d2b2f58560ab026f35a9f523e8540d2c6.tar.gz
opensim-SC-120f872d2b2f58560ab026f35a9f523e8540d2c6.tar.bz2
opensim-SC-120f872d2b2f58560ab026f35a9f523e8540d2c6.tar.xz
After an object with KeyframeMotion is copied into inventory, resume the motion (previously it remained stopped)
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs17
1 files changed, 15 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
index 781cc69..d30ce72 100644
--- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
+++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs
@@ -355,11 +355,17 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
355 CoalescedSceneObjects coa = new CoalescedSceneObjects(UUID.Zero); 355 CoalescedSceneObjects coa = new CoalescedSceneObjects(UUID.Zero);
356// Dictionary<UUID, Vector3> originalPositions = new Dictionary<UUID, Vector3>(); 356// Dictionary<UUID, Vector3> originalPositions = new Dictionary<UUID, Vector3>();
357 357
358 Dictionary<SceneObjectGroup, KeyframeMotion> group2Keyframe = new Dictionary<SceneObjectGroup, KeyframeMotion>();
359
358 foreach (SceneObjectGroup objectGroup in objlist) 360 foreach (SceneObjectGroup objectGroup in objlist)
359 { 361 {
360 if (objectGroup.RootPart.KeyframeMotion != null) 362 if (objectGroup.RootPart.KeyframeMotion != null)
361 objectGroup.RootPart.KeyframeMotion.Stop(); 363 {
362 objectGroup.RootPart.KeyframeMotion = null; 364 objectGroup.RootPart.KeyframeMotion.Pause();
365 group2Keyframe.Add(objectGroup, objectGroup.RootPart.KeyframeMotion);
366 objectGroup.RootPart.KeyframeMotion = null;
367 }
368
363// Vector3 inventoryStoredPosition = new Vector3 369// Vector3 inventoryStoredPosition = new Vector3
364// (((objectGroup.AbsolutePosition.X > (int)Constants.RegionSize) 370// (((objectGroup.AbsolutePosition.X > (int)Constants.RegionSize)
365// ? 250 371// ? 250
@@ -477,6 +483,13 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess
477 } 483 }
478 } 484 }
479 485
486 // Restore KeyframeMotion
487 foreach (SceneObjectGroup objectGroup in group2Keyframe.Keys)
488 {
489 objectGroup.RootPart.KeyframeMotion = group2Keyframe[objectGroup];
490 objectGroup.RootPart.KeyframeMotion.Start();
491 }
492
480 // This is a hook to do some per-asset post-processing for subclasses that need that 493 // This is a hook to do some per-asset post-processing for subclasses that need that
481 if (remoteClient != null) 494 if (remoteClient != null)
482 ExportAsset(remoteClient.AgentId, asset.FullID); 495 ExportAsset(remoteClient.AgentId, asset.FullID);