From 756d53db5e9c7a2ac73e501b7883381026f3c608 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 11 Jan 2013 13:39:14 +0000 Subject: keyframe. Don't use group UpdateRotation since this enqueues a terse update and we are sending them imediatly --- OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index edf2bef..995060b 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -544,8 +544,10 @@ namespace OpenSim.Region.Framework.Scenes m_nextPosition = (Vector3)m_currentFrame.Position; m_group.AbsolutePosition = m_nextPosition; - m_group.UpdateGroupRotationR((Quaternion)m_currentFrame.Rotation); + // we are sending imediate updates, no doing force a extra terseUpdate +// m_group.UpdateGroupRotationR((Quaternion)m_currentFrame.Rotation); + m_group.RootPart.RotationOffset = (Quaternion)m_currentFrame.Rotation; m_frames.RemoveAt(0); if (m_frames.Count > 0) m_currentFrame = m_frames[0]; @@ -613,7 +615,9 @@ namespace OpenSim.Region.Framework.Scenes // assuming w is a dependente var { - m_group.UpdateGroupRotationR(step); +// m_group.UpdateGroupRotationR(step); + m_group.RootPart.RotationOffset = step; + //m_group.RootPart.UpdateAngularVelocity(m_currentFrame.AngularVelocity / 2); update = true; } -- cgit v1.1 From 1f9dbdf8b8d8c70e654199c5f9a4258e0e6693f9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 11 Jan 2013 14:16:45 +0000 Subject: same for AngularVelocity. Use normal terse updates in place of sending imediatly. If that's good for physics, needs to be good for this --- OpenSim/Region/Framework/Scenes/KeyframeMotion.cs | 28 +++++++++++++++-------- 1 file changed, 18 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/Framework') diff --git a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs index 995060b..43f46d1 100644 --- a/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs +++ b/OpenSim/Region/Framework/Scenes/KeyframeMotion.cs @@ -345,9 +345,9 @@ namespace OpenSim.Region.Framework.Scenes m_baseRotation = m_group.GroupRotation; m_group.RootPart.Velocity = Vector3.Zero; - m_group.RootPart.UpdateAngularVelocity(Vector3.Zero); - m_group.SendGroupRootTerseUpdate(); - + m_group.RootPart.AngularVelocity = Vector3.Zero; +// m_group.SendGroupRootTerseUpdate(); + m_group.RootPart.ScheduleTerseUpdate(); m_frames.Clear(); } @@ -357,8 +357,10 @@ namespace OpenSim.Region.Framework.Scenes RemoveTimer(); m_group.RootPart.Velocity = Vector3.Zero; - m_group.RootPart.UpdateAngularVelocity(Vector3.Zero); - m_group.SendGroupRootTerseUpdate(); + m_group.RootPart.AngularVelocity = Vector3.Zero; +// m_group.SendGroupRootTerseUpdate(); + m_group.RootPart.ScheduleTerseUpdate(); + } private void GetNextList() @@ -489,7 +491,9 @@ namespace OpenSim.Region.Framework.Scenes if (m_group.RootPart.Velocity != Vector3.Zero) { m_group.RootPart.Velocity = Vector3.Zero; - m_group.SendGroupRootTerseUpdate(); +// m_group.SendGroupRootTerseUpdate(); + m_group.RootPart.ScheduleTerseUpdate(); + } m_inOnTimer = false; return; @@ -539,7 +543,7 @@ namespace OpenSim.Region.Framework.Scenes if (steps <= 0.0) { m_group.RootPart.Velocity = Vector3.Zero; - m_group.RootPart.UpdateAngularVelocity(Vector3.Zero); + m_group.RootPart.AngularVelocity = Vector3.Zero; m_nextPosition = (Vector3)m_currentFrame.Position; m_group.AbsolutePosition = m_nextPosition; @@ -625,7 +629,9 @@ namespace OpenSim.Region.Framework.Scenes } if (update) - m_group.SendGroupRootTerseUpdate(); +// m_group.SendGroupRootTerseUpdate(); + m_group.RootPart.ScheduleTerseUpdate(); + } catch ( Exception ex) @@ -675,7 +681,8 @@ namespace OpenSim.Region.Framework.Scenes if (m_group.RootPart.Velocity != Vector3.Zero) { m_group.RootPart.Velocity = Vector3.Zero; - m_group.SendGroupRootTerseUpdate(); +// m_group.SendGroupRootTerseUpdate(); + m_group.RootPart.ScheduleTerseUpdate(); } } @@ -686,7 +693,8 @@ namespace OpenSim.Region.Framework.Scenes if (m_group != null) { m_group.RootPart.Velocity = Vector3.Zero; - m_group.SendGroupRootTerseUpdate(); +// m_group.SendGroupRootTerseUpdate(); + m_group.RootPart.ScheduleTerseUpdate(); if (m_running && m_timer != null) { -- cgit v1.1