From 8830b8b72cd53af8ed0383ab3247e23dab87776e Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 13 Sep 2008 19:51:56 +0000 Subject: Mantis #2018 Read animation data from avataranimations.xml to allow default animations to be started and stopped by name from scripts. --- OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'OpenSim/Region/ClientStack') diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 57a995c..ee18a94 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs @@ -33,6 +33,7 @@ using System.Reflection; using System.Text; using System.Threading; using System.Timers; +using System.Xml; using OpenMetaverse; using OpenMetaverse.Packets; using log4net; @@ -3478,6 +3479,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP private void InitDefaultAnimations() { + using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml")) + { + XmlDocument doc = new XmlDocument(); + doc.Load(reader); + foreach (XmlNode nod in doc.DocumentElement.ChildNodes) + { + if (nod.Attributes["name"] != null) + { + string name = (string)nod.Attributes["name"].Value.ToLower(); + string id = (string)nod.InnerText; + m_defaultAnimations.Add(name, id); + } + } + } } public UUID GetDefaultAnimation(string name) -- cgit v1.1