From fca8c82232a42191270cb8d18dba6b54d382a2c2 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 26 Feb 2012 18:11:38 +0100 Subject: Move KeyframeMotion from SOG to SOP because we can't persist it any other way because SOG doesn't technically exist in the DB --- .../Shared/Api/Implementation/LSL_Api.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/ScriptEngine') 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 if (frames.Data.Length > 0) // We are getting a new motion { - if (group.KeyframeMotion != null) - group.KeyframeMotion.Stop(); - group.KeyframeMotion = null; + if (group.RootPart.KeyframeMotion != null) + group.RootPart.KeyframeMotion.Stop(); + group.RootPart.KeyframeMotion = null; int idx = 0; @@ -11953,7 +11953,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api } } - group.KeyframeMotion = new KeyframeMotion(group, mode, data); + group.RootPart.KeyframeMotion = new KeyframeMotion(group, mode, data); idx = 0; @@ -11990,17 +11990,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api keyframes.Add(frame); } - group.KeyframeMotion.SetKeyframes(keyframes.ToArray()); - group.KeyframeMotion.Start(); + group.RootPart.KeyframeMotion.SetKeyframes(keyframes.ToArray()); + group.RootPart.KeyframeMotion.Start(); } else { - if (group.KeyframeMotion == null) + if (group.RootPart.KeyframeMotion == null) return; if (options.Data.Length == 0) { - group.KeyframeMotion.Stop(); + group.RootPart.KeyframeMotion.Stop(); return; } @@ -12020,13 +12020,13 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api switch (cmd) { case ScriptBaseClass.KFM_CMD_PLAY: - group.KeyframeMotion.Start(); + group.RootPart.KeyframeMotion.Start(); break; case ScriptBaseClass.KFM_CMD_STOP: - group.KeyframeMotion.Stop(); + group.RootPart.KeyframeMotion.Stop(); break; case ScriptBaseClass.KFM_CMD_PAUSE: - group.KeyframeMotion.Pause(); + group.RootPart.KeyframeMotion.Pause(); break; } break; -- cgit v1.1