diff options
author | UbitUmarov | 2012-02-27 01:31:29 +0000 |
---|---|---|
committer | UbitUmarov | 2012-02-27 01:31:29 +0000 |
commit | f451f672131bfa293b9371984435a00c03174ff5 (patch) | |
tree | d8d85e06b4351d8b175e6353c5f824f8580d7fda /OpenSim/Region | |
parent | Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff) | |
parent | Merge branch 'ubitwork' (diff) | |
download | opensim-SC-f451f672131bfa293b9371984435a00c03174ff5.zip opensim-SC-f451f672131bfa293b9371984435a00c03174ff5.tar.gz opensim-SC-f451f672131bfa293b9371984435a00c03174ff5.tar.bz2 opensim-SC-f451f672131bfa293b9371984435a00c03174ff5.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Region')
9 files changed, 70 insertions, 39 deletions
diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 2498705..60a8f86 100644 --- a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs +++ b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs | |||
@@ -1746,6 +1746,12 @@ namespace OpenSim.Region.CoreModules.Framework.EntityTransfer | |||
1746 | if (grp.RootPart.PhysActor != null) | 1746 | if (grp.RootPart.PhysActor != null) |
1747 | { | 1747 | { |
1748 | grp.RootPart.PhysActor.CrossingFailure(); | 1748 | grp.RootPart.PhysActor.CrossingFailure(); |
1749 | if (grp.RootPart.KeyframeMotion != null) | ||
1750 | { | ||
1751 | grp.RootPart.Velocity = Vector3.Zero; | ||
1752 | grp.RootPart.KeyframeMotion.CrossingFailure(); | ||
1753 | grp.SendGroupRootTerseUpdate(); | ||
1754 | } | ||
1749 | } | 1755 | } |
1750 | } | 1756 | } |
1751 | 1757 | ||
diff --git a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs index 098123a..192d55f 100644 --- a/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs +++ b/OpenSim/Region/CoreModules/Framework/InventoryAccess/InventoryAccessModule.cs | |||
@@ -355,11 +355,11 @@ namespace OpenSim.Region.CoreModules.Framework.InventoryAccess | |||
355 | 355 | ||
356 | foreach (SceneObjectGroup objectGroup in objlist) | 356 | foreach (SceneObjectGroup objectGroup in objlist) |
357 | { | 357 | { |
358 | if (objectGroup.KeyframeMotion != null) | 358 | if (objectGroup.RootPart.KeyframeMotion != null) |
359 | objectGroup.KeyframeMotion.Stop(); | 359 | objectGroup.RootPart.KeyframeMotion.Stop(); |
360 | objectGroup.RootPart.SetForce(Vector3.Zero); | 360 | objectGroup.RootPart.SetForce(Vector3.Zero); |
361 | objectGroup.RootPart.SetAngularImpulse(Vector3.Zero, false); | 361 | objectGroup.RootPart.SetAngularImpulse(Vector3.Zero, false); |
362 | objectGroup.KeyframeMotion = null; | 362 | objectGroup.RootPart.KeyframeMotion = null; |
363 | 363 | ||
364 | Vector3 inventoryStoredPosition = new Vector3 | 364 | Vector3 inventoryStoredPosition = new Vector3 |
365 | (((objectGroup.AbsolutePosition.X > (int)Constants.RegionSize) | 365 | (((objectGroup.AbsolutePosition.X > (int)Constants.RegionSize) |
diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index bf18f4d..b7b0d27 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | |||
@@ -406,5 +406,17 @@ namespace OpenSim.Region.Framework.Scenes | |||
406 | m_group = tmp; | 406 | m_group = tmp; |
407 | return ms.ToArray(); | 407 | return ms.ToArray(); |
408 | } | 408 | } |
409 | |||
410 | public void CrossingFailure() | ||
411 | { | ||
412 | // The serialization has stopped the timer, so let's wait a moment | ||
413 | // then retry the crossing. We'll get back here if it fails. | ||
414 | Util.FireAndForget(delegate (object x) | ||
415 | { | ||
416 | Thread.Sleep(60000); | ||
417 | if (m_running) | ||
418 | m_timer.Start(); | ||
419 | }); | ||
420 | } | ||
409 | } | 421 | } |
410 | } | 422 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index c20da4b..11a41aa 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2421,8 +2421,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
2421 | 2421 | ||
2422 | if (newPosition != Vector3.Zero) | 2422 | if (newPosition != Vector3.Zero) |
2423 | newObject.RootPart.GroupPosition = newPosition; | 2423 | newObject.RootPart.GroupPosition = newPosition; |
2424 | if (newObject.KeyframeMotion != null) | 2424 | if (newObject.RootPart.KeyframeMotion != null) |
2425 | newObject.KeyframeMotion.UpdateSceneObject(newObject); | 2425 | newObject.RootPart.KeyframeMotion.UpdateSceneObject(newObject); |
2426 | 2426 | ||
2427 | if (!AddSceneObject(newObject)) | 2427 | if (!AddSceneObject(newObject)) |
2428 | { | 2428 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index 5a7f124..a3206015 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1731,6 +1731,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1731 | /// <param name="childPrims"></param> | 1731 | /// <param name="childPrims"></param> |
1732 | protected internal void LinkObjects(SceneObjectPart root, List<SceneObjectPart> children) | 1732 | protected internal void LinkObjects(SceneObjectPart root, List<SceneObjectPart> children) |
1733 | { | 1733 | { |
1734 | if (root.KeyframeMotion != null) | ||
1735 | { | ||
1736 | root.KeyframeMotion.Stop(); | ||
1737 | root.KeyframeMotion = null; | ||
1738 | } | ||
1739 | |||
1734 | SceneObjectGroup parentGroup = root.ParentGroup; | 1740 | SceneObjectGroup parentGroup = root.ParentGroup; |
1735 | if (parentGroup == null) return; | 1741 | if (parentGroup == null) return; |
1736 | 1742 | ||
@@ -1823,6 +1829,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1823 | { | 1829 | { |
1824 | if (part != null) | 1830 | if (part != null) |
1825 | { | 1831 | { |
1832 | if (part.KeyframeMotion != null) | ||
1833 | { | ||
1834 | part.KeyframeMotion.Stop(); | ||
1835 | part.KeyframeMotion = null; | ||
1836 | } | ||
1826 | if (part.ParentGroup.PrimCount != 1) // Skip single | 1837 | if (part.ParentGroup.PrimCount != 1) // Skip single |
1827 | { | 1838 | { |
1828 | if (part.LinkNum < 2) // Root | 1839 | if (part.LinkNum < 2) // Root |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index e509d4e..fefae9d 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -114,12 +114,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
114 | private Random m_rand; | 114 | private Random m_rand; |
115 | private bool m_suspendUpdates; | 115 | private bool m_suspendUpdates; |
116 | private List<ScenePresence> m_linkedAvatars = new List<ScenePresence>(); | 116 | private List<ScenePresence> m_linkedAvatars = new List<ScenePresence>(); |
117 | private KeyframeMotion m_keyframeMotion = null; | ||
118 | |||
119 | public KeyframeMotion KeyframeMotion | ||
120 | { | ||
121 | get; set; | ||
122 | } | ||
123 | 117 | ||
124 | public bool areUpdatesSuspended | 118 | public bool areUpdatesSuspended |
125 | { | 119 | { |
@@ -726,8 +720,8 @@ namespace OpenSim.Region.Framework.Scenes | |||
726 | child.PhysActor.Selected = value; | 720 | child.PhysActor.Selected = value; |
727 | } | 721 | } |
728 | } | 722 | } |
729 | if (KeyframeMotion != null) | 723 | if (RootPart.KeyframeMotion != null) |
730 | KeyframeMotion.Selected = value; | 724 | RootPart.KeyframeMotion.Selected = value; |
731 | } | 725 | } |
732 | } | 726 | } |
733 | 727 | ||
@@ -1829,11 +1823,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1829 | // Name, UUID, m_scene.RegionInfo.RegionName); | 1823 | // Name, UUID, m_scene.RegionInfo.RegionName); |
1830 | 1824 | ||
1831 | SceneObjectGroup backup_group = Copy(false); | 1825 | SceneObjectGroup backup_group = Copy(false); |
1832 | if (KeyframeMotion != null) | ||
1833 | { | ||
1834 | backup_group.KeyframeMotion = KeyframeMotion.FromData(backup_group, KeyframeMotion.Serialize()); | ||
1835 | KeyframeMotion.UpdateSceneObject(this); | ||
1836 | } | ||
1837 | backup_group.RootPart.Velocity = RootPart.Velocity; | 1826 | backup_group.RootPart.Velocity = RootPart.Velocity; |
1838 | backup_group.RootPart.Acceleration = RootPart.Acceleration; | 1827 | backup_group.RootPart.Acceleration = RootPart.Acceleration; |
1839 | backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity; | 1828 | backup_group.RootPart.AngularVelocity = RootPart.AngularVelocity; |
@@ -1846,6 +1835,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
1846 | 1835 | ||
1847 | backup_group.ForEachPart(delegate(SceneObjectPart part) | 1836 | backup_group.ForEachPart(delegate(SceneObjectPart part) |
1848 | { | 1837 | { |
1838 | if (part.KeyframeMotion != null) | ||
1839 | { | ||
1840 | part.KeyframeMotion = KeyframeMotion.FromData(backup_group, part.KeyframeMotion.Serialize()); | ||
1841 | part.KeyframeMotion.UpdateSceneObject(this); | ||
1842 | } | ||
1849 | part.Inventory.ProcessInventoryBackup(datastore); | 1843 | part.Inventory.ProcessInventoryBackup(datastore); |
1850 | }); | 1844 | }); |
1851 | 1845 | ||
@@ -2001,9 +1995,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2001 | { | 1995 | { |
2002 | if (usePhysics) | 1996 | if (usePhysics) |
2003 | { | 1997 | { |
2004 | if (KeyframeMotion != null) | 1998 | if (RootPart.KeyframeMotion != null) |
2005 | KeyframeMotion.Stop(); | 1999 | RootPart.KeyframeMotion.Stop(); |
2006 | KeyframeMotion = null; | 2000 | RootPart.KeyframeMotion = null; |
2007 | } | 2001 | } |
2008 | UpdatePrimFlags(RootPart.LocalId, usePhysics, IsTemporary, IsPhantom, IsVolumeDetect); | 2002 | UpdatePrimFlags(RootPart.LocalId, usePhysics, IsTemporary, IsPhantom, IsVolumeDetect); |
2009 | } | 2003 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 0728042..ea3d716 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -315,6 +315,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
315 | 315 | ||
316 | private SOPVehicle m_vehicle = null; | 316 | private SOPVehicle m_vehicle = null; |
317 | 317 | ||
318 | private KeyframeMotion m_keyframeMotion = null; | ||
319 | |||
320 | public KeyframeMotion KeyframeMotion | ||
321 | { | ||
322 | get; set; | ||
323 | } | ||
324 | |||
325 | |||
318 | #endregion Fields | 326 | #endregion Fields |
319 | 327 | ||
320 | // ~SceneObjectPart() | 328 | // ~SceneObjectPart() |
@@ -1924,9 +1932,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1924 | { | 1932 | { |
1925 | if (UsePhysics) | 1933 | if (UsePhysics) |
1926 | { | 1934 | { |
1927 | if (ParentGroup.KeyframeMotion != null) | 1935 | if (ParentGroup.RootPart.KeyframeMotion != null) |
1928 | ParentGroup.KeyframeMotion.Stop(); | 1936 | ParentGroup.RootPart.KeyframeMotion.Stop(); |
1929 | ParentGroup.KeyframeMotion = null; | 1937 | ParentGroup.RootPart.KeyframeMotion = null; |
1930 | ParentGroup.Scene.AddPhysicalPrim(1); | 1938 | ParentGroup.Scene.AddPhysicalPrim(1); |
1931 | 1939 | ||
1932 | PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate; | 1940 | PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate; |
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs index 118a63a..51a3320 100644 --- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs +++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs | |||
@@ -246,9 +246,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
246 | 246 | ||
247 | XmlNodeList keymotion = doc.GetElementsByTagName("KeyframeMotion"); | 247 | XmlNodeList keymotion = doc.GetElementsByTagName("KeyframeMotion"); |
248 | if (keymotion.Count > 0) | 248 | if (keymotion.Count > 0) |
249 | sceneObject.KeyframeMotion = KeyframeMotion.FromData(sceneObject, Convert.FromBase64String(keymotion[0].InnerText)); | 249 | sceneObject.RootPart.KeyframeMotion = KeyframeMotion.FromData(sceneObject, Convert.FromBase64String(keymotion[0].InnerText)); |
250 | else | 250 | else |
251 | sceneObject.KeyframeMotion = null; | 251 | sceneObject.RootPart.KeyframeMotion = null; |
252 | 252 | ||
253 | // Script state may, or may not, exist. Not having any, is NOT | 253 | // Script state may, or may not, exist. Not having any, is NOT |
254 | // ever a problem. | 254 | // ever a problem. |
@@ -1174,9 +1174,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization | |||
1174 | 1174 | ||
1175 | writer.WriteEndElement(); | 1175 | writer.WriteEndElement(); |
1176 | 1176 | ||
1177 | if (sog.KeyframeMotion != null) | 1177 | if (sog.RootPart.KeyframeMotion != null) |
1178 | { | 1178 | { |
1179 | Byte[] data = sog.KeyframeMotion.Serialize(); | 1179 | Byte[] data = sog.RootPart.KeyframeMotion.Serialize(); |
1180 | 1180 | ||
1181 | writer.WriteStartElement(String.Empty, "KeyframeMotion", String.Empty); | 1181 | writer.WriteStartElement(String.Empty, "KeyframeMotion", String.Empty); |
1182 | writer.WriteBase64(data, 0, data.Length); | 1182 | writer.WriteBase64(data, 0, data.Length); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index e4ab14f..e9f9c2d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -11908,9 +11908,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11908 | 11908 | ||
11909 | if (frames.Data.Length > 0) // We are getting a new motion | 11909 | if (frames.Data.Length > 0) // We are getting a new motion |
11910 | { | 11910 | { |
11911 | if (group.KeyframeMotion != null) | 11911 | if (group.RootPart.KeyframeMotion != null) |
11912 | group.KeyframeMotion.Stop(); | 11912 | group.RootPart.KeyframeMotion.Stop(); |
11913 | group.KeyframeMotion = null; | 11913 | group.RootPart.KeyframeMotion = null; |
11914 | 11914 | ||
11915 | int idx = 0; | 11915 | int idx = 0; |
11916 | 11916 | ||
@@ -11953,7 +11953,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11953 | } | 11953 | } |
11954 | } | 11954 | } |
11955 | 11955 | ||
11956 | group.KeyframeMotion = new KeyframeMotion(group, mode, data); | 11956 | group.RootPart.KeyframeMotion = new KeyframeMotion(group, mode, data); |
11957 | 11957 | ||
11958 | idx = 0; | 11958 | idx = 0; |
11959 | 11959 | ||
@@ -11990,17 +11990,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11990 | keyframes.Add(frame); | 11990 | keyframes.Add(frame); |
11991 | } | 11991 | } |
11992 | 11992 | ||
11993 | group.KeyframeMotion.SetKeyframes(keyframes.ToArray()); | 11993 | group.RootPart.KeyframeMotion.SetKeyframes(keyframes.ToArray()); |
11994 | group.KeyframeMotion.Start(); | 11994 | group.RootPart.KeyframeMotion.Start(); |
11995 | } | 11995 | } |
11996 | else | 11996 | else |
11997 | { | 11997 | { |
11998 | if (group.KeyframeMotion == null) | 11998 | if (group.RootPart.KeyframeMotion == null) |
11999 | return; | 11999 | return; |
12000 | 12000 | ||
12001 | if (options.Data.Length == 0) | 12001 | if (options.Data.Length == 0) |
12002 | { | 12002 | { |
12003 | group.KeyframeMotion.Stop(); | 12003 | group.RootPart.KeyframeMotion.Stop(); |
12004 | return; | 12004 | return; |
12005 | } | 12005 | } |
12006 | 12006 | ||
@@ -12020,13 +12020,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
12020 | switch (cmd) | 12020 | switch (cmd) |
12021 | { | 12021 | { |
12022 | case ScriptBaseClass.KFM_CMD_PLAY: | 12022 | case ScriptBaseClass.KFM_CMD_PLAY: |
12023 | group.KeyframeMotion.Start(); | 12023 | group.RootPart.KeyframeMotion.Start(); |
12024 | break; | 12024 | break; |
12025 | case ScriptBaseClass.KFM_CMD_STOP: | 12025 | case ScriptBaseClass.KFM_CMD_STOP: |
12026 | group.KeyframeMotion.Stop(); | 12026 | group.RootPart.KeyframeMotion.Stop(); |
12027 | break; | 12027 | break; |
12028 | case ScriptBaseClass.KFM_CMD_PAUSE: | 12028 | case ScriptBaseClass.KFM_CMD_PAUSE: |
12029 | group.KeyframeMotion.Pause(); | 12029 | group.RootPart.KeyframeMotion.Pause(); |
12030 | break; | 12030 | break; |
12031 | } | 12031 | } |
12032 | break; | 12032 | break; |