diff options
Diffstat (limited to 'OpenSim/OpenSim.Region/World')
-rw-r--r-- | OpenSim/OpenSim.Region/World/Entities/Avatar/Avatar.Animations.cs (renamed from OpenSim/OpenSim.Region/World/Entities/Avatar/AvatarAnimations.cs) | 53 |
1 files changed, 28 insertions, 25 deletions
diff --git a/OpenSim/OpenSim.Region/World/Entities/Avatar/AvatarAnimations.cs b/OpenSim/OpenSim.Region/World/Entities/Avatar/Avatar.Animations.cs index 585cf3c..5f24cd4 100644 --- a/OpenSim/OpenSim.Region/World/Entities/Avatar/AvatarAnimations.cs +++ b/OpenSim/OpenSim.Region/World/Entities/Avatar/Avatar.Animations.cs | |||
@@ -33,40 +33,43 @@ using System.Xml; | |||
33 | 33 | ||
34 | namespace OpenSim.Region | 34 | namespace OpenSim.Region |
35 | { | 35 | { |
36 | public class AvatarAnimations | 36 | partial class Avatar |
37 | { | 37 | { |
38 | 38 | public class AvatarAnimations | |
39 | public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>(); | ||
40 | public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>(); | ||
41 | |||
42 | public AvatarAnimations() | ||
43 | { | 39 | { |
44 | } | ||
45 | 40 | ||
46 | public void LoadAnims() | 41 | public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>(); |
47 | { | 42 | public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>(); |
48 | //OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:LoadAnims() - Loading avatar animations"); | 43 | |
49 | XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"); | 44 | public AvatarAnimations() |
50 | 45 | { | |
51 | XmlDocument doc = new XmlDocument(); | 46 | } |
52 | doc.Load(reader); | 47 | |
53 | foreach (XmlNode nod in doc.DocumentElement.ChildNodes) | 48 | public void LoadAnims() |
54 | { | 49 | { |
55 | 50 | //OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:LoadAnims() - Loading avatar animations"); | |
56 | if ( nod.Attributes["name"] != null) | 51 | XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"); |
52 | |||
53 | XmlDocument doc = new XmlDocument(); | ||
54 | doc.Load(reader); | ||
55 | foreach (XmlNode nod in doc.DocumentElement.ChildNodes) | ||
57 | { | 56 | { |
58 | AnimsLLUUID.Add(nod.Attributes["name"].Value, nod.InnerText); | 57 | |
58 | if (nod.Attributes["name"] != null) | ||
59 | { | ||
60 | AnimsLLUUID.Add(nod.Attributes["name"].Value, nod.InnerText); | ||
61 | } | ||
62 | |||
59 | } | 63 | } |
60 | |||
61 | } | ||
62 | 64 | ||
63 | reader.Close(); | 65 | reader.Close(); |
64 | 66 | ||
65 | // OpenSim.Framework.Console.MainConsole.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); | 67 | // OpenSim.Framework.Console.MainConsole.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); |
66 | 68 | ||
67 | foreach (KeyValuePair<string, LLUUID> kp in OpenSim.Region.Avatar.Animations.AnimsLLUUID) | 69 | foreach (KeyValuePair<string, LLUUID> kp in OpenSim.Region.Avatar.Animations.AnimsLLUUID) |
68 | { | 70 | { |
69 | AnimsNames.Add(kp.Value, kp.Key); | 71 | AnimsNames.Add(kp.Value, kp.Key); |
72 | } | ||
70 | } | 73 | } |
71 | } | 74 | } |
72 | } | 75 | } |