From e5e5b94cbe6076f74d5ad2358d020f7d4f7ac18f Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 26 Feb 2012 21:16:24 +0100 Subject: [PATCH] Make llSetKeyframedMotion prims waut at the borders of down sims and try again periodically. --- .../Framework/EntityTransfer/EntityTransferModule.cs | 6 ++++++ OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs b/OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs index 2498705a82..60a8f86651 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 if (grp.RootPart.PhysActor != null) { grp.RootPart.PhysActor.CrossingFailure(); + if (grp.RootPart.KeyframeMotion != null) + { + grp.RootPart.Velocity = Vector3.Zero; + grp.RootPart.KeyframeMotion.CrossingFailure(); + grp.SendGroupRootTerseUpdate(); + } } } diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index bf18f4de48..b7b0d27388 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -406,5 +406,17 @@ namespace OpenSim.Region.Framework.Scenes m_group = tmp; return ms.ToArray(); } + + public void CrossingFailure() + { + // The serialization has stopped the timer, so let's wait a moment + // then retry the crossing. We'll get back here if it fails. + Util.FireAndForget(delegate (object x) + { + Thread.Sleep(60000); + if (m_running) + m_timer.Start(); + }); + } } }