From 12c9916193bbb87aaa95407f798c241cbe5e23cb Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Fri, 4 May 2012 19:19:54 +0100 Subject: *TO TEST/REVIEW* added current default animation in animationSet.cs to/fromArray in array element 0. This may cause compatibilities issues, but think this information is needed for proper crossings. OSG regions did survived tps in/out with this. ALso added velocity in crossings cases, for now detected by Teleport flag equal to Default (0); --- OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs') diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs index 33041e9..da1b9e0 100644 --- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs +++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs @@ -168,10 +168,11 @@ namespace OpenSim.Region.Framework.Scenes.Animation public OpenSim.Framework.Animation[] ToArray() { - OpenSim.Framework.Animation[] theArray = new OpenSim.Framework.Animation[m_animations.Count]; + OpenSim.Framework.Animation[] theArray = new OpenSim.Framework.Animation[m_animations.Count + 1]; uint i = 0; try { + theArray[i++] = m_defaultAnimation; foreach (OpenSim.Framework.Animation anim in m_animations) theArray[i++] = anim; } @@ -184,8 +185,14 @@ namespace OpenSim.Region.Framework.Scenes.Animation public void FromArray(OpenSim.Framework.Animation[] theArray) { - foreach (OpenSim.Framework.Animation anim in theArray) - m_animations.Add(anim); +// foreach (OpenSim.Framework.Animation anim in theArray) +// m_animations.Add(anim); + if (theArray.Length > 0) + { + m_defaultAnimation = theArray[0]; + for (int i = 1; i < theArray.Length; i++) + m_animations.Add(theArray[i]); + } } } } -- cgit v1.1