* Loading animations from XML file now

zircon^2
Adam Frisby 2007-06-04 12:05:18 +00:00
parent a415615270
commit 7554af993f
1 changed files with 16 additions and 0 deletions

View File

@ -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<string, LLUUID> kp in OpenSim.world.Avatar.Animations.AnimsLLUUID)
{