From e1a455eae56b08cf37f972af9f702788851cecdc Mon Sep 17 00:00:00 2001 From: Jeff Kelley Date: Thu, 13 Aug 2015 10:13:01 +0200 Subject: [PATCH] Fix multiple moving_end and add moving_start to llSetKeyframedMotion Signed-off-by: Melanie Thielker --- .../Region/Framework/Scenes/KeyframeMotion.cs | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index b4a171f5ab..646403ff18 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -454,6 +454,7 @@ namespace OpenSim.Region.Framework.Scenes { StartTimer(); m_running = true; + m_group.Scene.EventManager.TriggerMovingStartEvent(m_group.RootPart.LocalId); } else { @@ -634,21 +635,25 @@ namespace OpenSim.Region.Framework.Scenes if (m_frames.Count == 0) { + if (!m_running) return; + GetNextList(); if (m_frames.Count == 0) { Stop(); - Scene scene = m_group.Scene; - - IScriptModule[] scriptModules = scene.RequestModuleInterfaces(); - foreach (IScriptModule m in scriptModules) - { - if (m == null) - continue; - m.PostObjectEvent(m_group.RootPart.UUID, "moving_end", new object[0]); - } +// Scene scene = m_group.Scene; +// +// IScriptModule[] scriptModules = scene.RequestModuleInterfaces(); +// foreach (IScriptModule m in scriptModules) +// { +// if (m == null) +// continue; +// m.PostObjectEvent(m_group.RootPart.UUID, "moving_end", new object[0]); +// } + m_group.Scene.EventManager.TriggerMovingEndEvent(m_group.RootPart.LocalId); + return; }