Prevent empty Anim Packs
parent
2ac96dd181
commit
5561333668
|
@ -164,7 +164,13 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
{
|
{
|
||||||
int defaultSize = 0;
|
int defaultSize = 0;
|
||||||
if (m_defaultAnimation.AnimID != UUID.Zero)
|
if (m_defaultAnimation.AnimID != UUID.Zero)
|
||||||
|
{
|
||||||
defaultSize++;
|
defaultSize++;
|
||||||
|
}
|
||||||
|
else if (m_animations.Count == 0)
|
||||||
|
{
|
||||||
|
defaultSize++;
|
||||||
|
}
|
||||||
|
|
||||||
animIDs = new UUID[m_animations.Count + defaultSize];
|
animIDs = new UUID[m_animations.Count + defaultSize];
|
||||||
sequenceNums = new int[m_animations.Count + defaultSize];
|
sequenceNums = new int[m_animations.Count + defaultSize];
|
||||||
|
@ -176,6 +182,12 @@ namespace OpenSim.Region.Framework.Scenes.Animation
|
||||||
sequenceNums[0] = m_defaultAnimation.SequenceNum;
|
sequenceNums[0] = m_defaultAnimation.SequenceNum;
|
||||||
objectIDs[0] = m_defaultAnimation.ObjectID;
|
objectIDs[0] = m_defaultAnimation.ObjectID;
|
||||||
}
|
}
|
||||||
|
else if (m_animations.Count == 0)
|
||||||
|
{
|
||||||
|
animIDs[0] = m_implicitDefaultAnimation.AnimID;
|
||||||
|
sequenceNums[0] = m_defaultAnimation.SequenceNum;
|
||||||
|
objectIDs[0] = m_implicitDefaultAnimation.ObjectID;
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < m_animations.Count; ++i)
|
for (int i = 0; i < m_animations.Count; ++i)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue