diff options
Adds support for preserving animations on region crossings and TPs.
Known issue: after TP, the self client doesn't see the animations going, but others can see them. So there's a bug there (TPs only, crossings seem to be all fine).
Untested: did not test animation overriders; only tested playing animations from the viewer.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/AnimationSet.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/AnimationSet.cs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/AnimationSet.cs index 80e20fc..ab65166 100644 --- a/OpenSim/Region/Framework/Scenes/AnimationSet.cs +++ b/OpenSim/Region/Framework/Scenes/AnimationSet.cs | |||
@@ -153,5 +153,27 @@ namespace OpenSim.Region.Framework.Scenes | |||
153 | } | 153 | } |
154 | } | 154 | } |
155 | } | 155 | } |
156 | |||
157 | public Animation[] ToArray() | ||
158 | { | ||
159 | Animation[] theArray = new Animation[m_animations.Count]; | ||
160 | uint i = 0; | ||
161 | try | ||
162 | { | ||
163 | foreach (Animation anim in m_animations) | ||
164 | theArray[i++] = anim; | ||
165 | } | ||
166 | catch | ||
167 | { | ||
168 | /* S%^t happens. Ignore. */ | ||
169 | } | ||
170 | return theArray; | ||
171 | } | ||
172 | |||
173 | public void FromArray(Animation[] theArray) | ||
174 | { | ||
175 | foreach (Animation anim in theArray) | ||
176 | m_animations.Add(anim); | ||
177 | } | ||
156 | } | 178 | } |
157 | } | 179 | } |