Fixed loading of Animations from XML file

*Still crashes the client. HelP!
zircon^2
mingchen 2007-06-04 19:27:31 +00:00
parent 4d6441c0db
commit 4fcb4fdec3
1 changed files with 7 additions and 4 deletions

View File

@ -20,15 +20,18 @@ namespace OpenSim.world
{
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)
foreach (XmlNode nod in doc.DocumentElement.ChildNodes)
{
if ( nod.Attributes["name"] != null)
{
AnimsLLUUID.Add(nod.Attributes["name"].ToString(), new LLUUID(nod.Value));
//Console.WriteLine("'" + nod.Attributes["name"].Value + "' - '" + nod.InnerText + "'");
AnimsLLUUID.Add(nod.Attributes["name"].Value, nod.InnerText);
}
}
reader.Close();