From 4fcb4fdec3d3cf2c63006d17accba66c10bdaa31 Mon Sep 17 00:00:00 2001 From: mingchen Date: Mon, 4 Jun 2007 19:27:31 +0000 Subject: Fixed loading of Animations from XML file *Still crashes the client. HelP! --- OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'OpenSim/OpenSim.RegionServer/world') diff --git a/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs b/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs index 8fa9c42..2c1280d 100644 --- a/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs +++ b/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs @@ -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) + + 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(); -- cgit v1.1