diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/AnimationSet.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/AnimationSet.cs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/AnimationSet.cs b/OpenSim/Region/Framework/Scenes/AnimationSet.cs index 49bcda8..864e599 100644 --- a/OpenSim/Region/Framework/Scenes/AnimationSet.cs +++ b/OpenSim/Region/Framework/Scenes/AnimationSet.cs | |||
@@ -60,13 +60,13 @@ namespace OpenSim.Region.Framework.Scenes | |||
60 | return false; | 60 | return false; |
61 | } | 61 | } |
62 | 62 | ||
63 | public bool Add(UUID animID, int sequenceNum) | 63 | public bool Add(UUID animID, int sequenceNum, UUID objectID) |
64 | { | 64 | { |
65 | lock (m_animations) | 65 | lock (m_animations) |
66 | { | 66 | { |
67 | if (!HasAnimation(animID)) | 67 | if (!HasAnimation(animID)) |
68 | { | 68 | { |
69 | m_animations.Add(new Animation(animID, sequenceNum)); | 69 | m_animations.Add(new Animation(animID, sequenceNum, objectID)); |
70 | return true; | 70 | return true; |
71 | } | 71 | } |
72 | } | 72 | } |
@@ -106,11 +106,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
106 | /// The default animation is reserved for "main" animations | 106 | /// The default animation is reserved for "main" animations |
107 | /// that are mutually exclusive, e.g. flying and sitting. | 107 | /// that are mutually exclusive, e.g. flying and sitting. |
108 | /// </summary> | 108 | /// </summary> |
109 | public bool SetDefaultAnimation(UUID animID, int sequenceNum) | 109 | public bool SetDefaultAnimation(UUID animID, int sequenceNum, UUID objectID) |
110 | { | 110 | { |
111 | if (m_defaultAnimation.AnimID != animID) | 111 | if (m_defaultAnimation.AnimID != animID) |
112 | { | 112 | { |
113 | m_defaultAnimation = new Animation(animID, sequenceNum); | 113 | m_defaultAnimation = new Animation(animID, sequenceNum, objectID); |
114 | return true; | 114 | return true; |
115 | } | 115 | } |
116 | return false; | 116 | return false; |
@@ -118,27 +118,28 @@ namespace OpenSim.Region.Framework.Scenes | |||
118 | 118 | ||
119 | protected bool ResetDefaultAnimation() | 119 | protected bool ResetDefaultAnimation() |
120 | { | 120 | { |
121 | return TrySetDefaultAnimation("STAND", 1); | 121 | return TrySetDefaultAnimation("STAND", 1, UUID.Zero); |
122 | } | 122 | } |
123 | 123 | ||
124 | /// <summary> | 124 | /// <summary> |
125 | /// Set the animation as the default animation if it's known | 125 | /// Set the animation as the default animation if it's known |
126 | /// </summary> | 126 | /// </summary> |
127 | public bool TrySetDefaultAnimation(string anim, int sequenceNum) | 127 | public bool TrySetDefaultAnimation(string anim, int sequenceNum, UUID objectID) |
128 | { | 128 | { |
129 | if (Animations.AnimsUUID.ContainsKey(anim)) | 129 | if (Animations.AnimsUUID.ContainsKey(anim)) |
130 | { | 130 | { |
131 | return SetDefaultAnimation(Animations.AnimsUUID[anim], sequenceNum); | 131 | return SetDefaultAnimation(Animations.AnimsUUID[anim], sequenceNum, objectID); |
132 | } | 132 | } |
133 | return false; | 133 | return false; |
134 | } | 134 | } |
135 | 135 | ||
136 | public void GetArrays(out UUID[] animIDs, out int[] sequenceNums) | 136 | public void GetArrays(out UUID[] animIDs, out int[] sequenceNums, out UUID[] objectIDs) |
137 | { | 137 | { |
138 | lock (m_animations) | 138 | lock (m_animations) |
139 | { | 139 | { |
140 | animIDs = new UUID[m_animations.Count + 1]; | 140 | animIDs = new UUID[m_animations.Count + 1]; |
141 | sequenceNums = new int[m_animations.Count + 1]; | 141 | sequenceNums = new int[m_animations.Count + 1]; |
142 | objectIDs = new UUID[m_animations.Count + 1]; | ||
142 | 143 | ||
143 | animIDs[0] = m_defaultAnimation.AnimID; | 144 | animIDs[0] = m_defaultAnimation.AnimID; |
144 | sequenceNums[0] = m_defaultAnimation.SequenceNum; | 145 | sequenceNums[0] = m_defaultAnimation.SequenceNum; |
@@ -147,6 +148,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
147 | { | 148 | { |
148 | animIDs[i + 1] = m_animations[i].AnimID; | 149 | animIDs[i + 1] = m_animations[i].AnimID; |
149 | sequenceNums[i + 1] = m_animations[i].SequenceNum; | 150 | sequenceNums[i + 1] = m_animations[i].SequenceNum; |
151 | objectIDs[i + i] = m_animations[i].ObjectID; | ||
150 | } | 152 | } |
151 | } | 153 | } |
152 | } | 154 | } |