* Loading animations from XML file now
parent
a415615270
commit
7554af993f
|
@ -2,6 +2,7 @@ using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using libsecondlife;
|
using libsecondlife;
|
||||||
|
using System.Xml;
|
||||||
|
|
||||||
namespace OpenSim.world
|
namespace OpenSim.world
|
||||||
{
|
{
|
||||||
|
@ -18,6 +19,21 @@ namespace OpenSim.world
|
||||||
public void LoadAnims()
|
public void LoadAnims()
|
||||||
{
|
{
|
||||||
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");
|
||||||
|
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)
|
foreach (KeyValuePair<string, LLUUID> kp in OpenSim.world.Avatar.Animations.AnimsLLUUID)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue