diff options
Diffstat (limited to 'OpenSim/Framework/AnimationSet.cs')
-rw-r--r-- | OpenSim/Framework/AnimationSet.cs | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/OpenSim/Framework/AnimationSet.cs b/OpenSim/Framework/AnimationSet.cs index 87c4a78..8753088 100644 --- a/OpenSim/Framework/AnimationSet.cs +++ b/OpenSim/Framework/AnimationSet.cs | |||
@@ -31,7 +31,8 @@ using OpenMetaverse; | |||
31 | 31 | ||
32 | namespace OpenSim.Framework | 32 | namespace OpenSim.Framework |
33 | { | 33 | { |
34 | public delegate bool AnimationSetValidator(UUID animID); | 34 | // public delegate bool AnimationSetValidator(UUID animID); |
35 | public delegate uint AnimationSetValidator(UUID animID); | ||
35 | 36 | ||
36 | public class AnimationSet | 37 | public class AnimationSet |
37 | { | 38 | { |
@@ -141,7 +142,7 @@ namespace OpenSim.Framework | |||
141 | assetData += String.Format("{0} {1} {2}\n", kvp.Key, kvp.Value.Value.ToString(), kvp.Value.Key); | 142 | assetData += String.Format("{0} {1} {2}\n", kvp.Key, kvp.Value.Value.ToString(), kvp.Value.Key); |
142 | return System.Text.Encoding.ASCII.GetBytes(assetData); | 143 | return System.Text.Encoding.ASCII.GetBytes(assetData); |
143 | } | 144 | } |
144 | 145 | /* | |
145 | public bool Validate(AnimationSetValidator val) | 146 | public bool Validate(AnimationSetValidator val) |
146 | { | 147 | { |
147 | if (m_parseError) | 148 | if (m_parseError) |
@@ -164,5 +165,22 @@ namespace OpenSim.Framework | |||
164 | 165 | ||
165 | return allOk; | 166 | return allOk; |
166 | } | 167 | } |
168 | */ | ||
169 | public uint Validate(AnimationSetValidator val) | ||
170 | { | ||
171 | if (m_parseError) | ||
172 | return 0; | ||
173 | |||
174 | uint ret = 0x7fffffff; | ||
175 | uint t; | ||
176 | foreach (KeyValuePair<string, KeyValuePair<string, UUID>> kvp in m_animations) | ||
177 | { | ||
178 | t = val(kvp.Value.Value); | ||
179 | if (t == 0) | ||
180 | return 0; | ||
181 | ret &= t; | ||
182 | } | ||
183 | return ret; | ||
184 | } | ||
167 | } | 185 | } |
168 | } | 186 | } |