diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs | 13 |
1 files changed, 10 insertions, 3 deletions
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 | |||
168 | 168 | ||
169 | public OpenSim.Framework.Animation[] ToArray() | 169 | public OpenSim.Framework.Animation[] ToArray() |
170 | { | 170 | { |
171 | OpenSim.Framework.Animation[] theArray = new OpenSim.Framework.Animation[m_animations.Count]; | 171 | OpenSim.Framework.Animation[] theArray = new OpenSim.Framework.Animation[m_animations.Count + 1]; |
172 | uint i = 0; | 172 | uint i = 0; |
173 | try | 173 | try |
174 | { | 174 | { |
175 | theArray[i++] = m_defaultAnimation; | ||
175 | foreach (OpenSim.Framework.Animation anim in m_animations) | 176 | foreach (OpenSim.Framework.Animation anim in m_animations) |
176 | theArray[i++] = anim; | 177 | theArray[i++] = anim; |
177 | } | 178 | } |
@@ -184,8 +185,14 @@ namespace OpenSim.Region.Framework.Scenes.Animation | |||
184 | 185 | ||
185 | public void FromArray(OpenSim.Framework.Animation[] theArray) | 186 | public void FromArray(OpenSim.Framework.Animation[] theArray) |
186 | { | 187 | { |
187 | foreach (OpenSim.Framework.Animation anim in theArray) | 188 | // foreach (OpenSim.Framework.Animation anim in theArray) |
188 | m_animations.Add(anim); | 189 | // m_animations.Add(anim); |
190 | if (theArray.Length > 0) | ||
191 | { | ||
192 | m_defaultAnimation = theArray[0]; | ||
193 | for (int i = 1; i < theArray.Length; i++) | ||
194 | m_animations.Add(theArray[i]); | ||
195 | } | ||
189 | } | 196 | } |
190 | } | 197 | } |
191 | } | 198 | } |