aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/AnimationSet.cs
diff options
context:
space:
mode:
authordiva2009-02-18 01:49:18 +0000
committerdiva2009-02-18 01:49:18 +0000
commit3f25128e77af2a53e765436454b8fddeb8f88894 (patch)
tree461d17a9e357e262a08583789617749986978881 /OpenSim/Region/Framework/Scenes/AnimationSet.cs
parentMakes SP.CopyFrom a bit more robust with respect to sims in older versions wh... (diff)
downloadopensim-SC_OLD-3f25128e77af2a53e765436454b8fddeb8f88894.zip
opensim-SC_OLD-3f25128e77af2a53e765436454b8fddeb8f88894.tar.gz
opensim-SC_OLD-3f25128e77af2a53e765436454b8fddeb8f88894.tar.bz2
opensim-SC_OLD-3f25128e77af2a53e765436454b8fddeb8f88894.tar.xz
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.cs22
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}