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"); OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Avatar.cs:LoadAnims() - Loading avatar animations");
XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"); XmlTextReader reader = new XmlTextReader("data/avataranimations.xml");
XmlDocument doc = new XmlDocument(); XmlDocument doc = new XmlDocument();
doc.Load(reader); doc.Load(reader);
foreach (XmlNode nod in doc.DocumentElement.ChildNodes)
{
foreach (XmlNode nod in doc.FirstChild.ChildNodes) if ( nod.Attributes["name"] != null)
{ {
if (nod.Attributes["name"] != null) //Console.WriteLine("'" + nod.Attributes["name"].Value + "' - '" + nod.InnerText + "'");
{ AnimsLLUUID.Add(nod.Attributes["name"].Value, nod.InnerText);
AnimsLLUUID.Add(nod.Attributes["name"].ToString(), new LLUUID(nod.Value));
} }
} }
reader.Close(); reader.Close();