aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
authorMelanie2013-01-08 23:01:09 +0100
committerMelanie2013-01-08 23:01:09 +0100
commitab053df706055b0aa8fe2d10f89488be97d36841 (patch)
tree6b0ddbc5540f2d77c3d86a934d72e552c8a39f61 /OpenSim/Region/Framework
parentAdd the new UpdateAgentInformation cap to make maturity on more recent viewers (diff)
downloadopensim-SC-ab053df706055b0aa8fe2d10f89488be97d36841.zip
opensim-SC-ab053df706055b0aa8fe2d10f89488be97d36841.tar.gz
opensim-SC-ab053df706055b0aa8fe2d10f89488be97d36841.tar.bz2
opensim-SC-ab053df706055b0aa8fe2d10f89488be97d36841.tar.xz
Prevent empty Anim Packs
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs12
1 files changed, 12 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
index 65ae445..d2fc7f1 100644
--- a/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
+++ b/OpenSim/Region/Framework/Scenes/Animation/AnimationSet.cs
@@ -164,7 +164,13 @@ namespace OpenSim.Region.Framework.Scenes.Animation
164 { 164 {
165 int defaultSize = 0; 165 int defaultSize = 0;
166 if (m_defaultAnimation.AnimID != UUID.Zero) 166 if (m_defaultAnimation.AnimID != UUID.Zero)
167 {
168 defaultSize++;
169 }
170 else if (m_animations.Count == 0)
171 {
167 defaultSize++; 172 defaultSize++;
173 }
168 174
169 animIDs = new UUID[m_animations.Count + defaultSize]; 175 animIDs = new UUID[m_animations.Count + defaultSize];
170 sequenceNums = new int[m_animations.Count + defaultSize]; 176 sequenceNums = new int[m_animations.Count + defaultSize];
@@ -176,6 +182,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation
176 sequenceNums[0] = m_defaultAnimation.SequenceNum; 182 sequenceNums[0] = m_defaultAnimation.SequenceNum;
177 objectIDs[0] = m_defaultAnimation.ObjectID; 183 objectIDs[0] = m_defaultAnimation.ObjectID;
178 } 184 }
185 else if (m_animations.Count == 0)
186 {
187 animIDs[0] = m_implicitDefaultAnimation.AnimID;
188 sequenceNums[0] = m_defaultAnimation.SequenceNum;
189 objectIDs[0] = m_implicitDefaultAnimation.ObjectID;
190 }
179 191
180 for (int i = 0; i < m_animations.Count; ++i) 192 for (int i = 0; i < m_animations.Count; ++i)
181 { 193 {