diff --git a/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs b/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs index adf49f2895..f4c50a724a 100644 --- a/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs +++ b/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Text; using libsecondlife; +using System.Xml; namespace OpenSim.world { @@ -18,6 +19,21 @@ namespace OpenSim.world public void LoadAnims() { OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Avatar.cs:LoadAnims() - Loading avatar animations"); + XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"); + XmlDocument doc = new XmlDocument(); + doc.Load(reader); + + foreach (XmlNode nod in doc.FirstChild.ChildNodes) + { + if (nod.Attributes["name"] != null) + { + AnimsLLUUID.Add(nod.Attributes["name"], nod.Value); + } + } + + reader.Close(); + + OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); foreach (KeyValuePair kp in OpenSim.world.Avatar.Animations.AnimsLLUUID) {