mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 16:22:50 +08:00
Mantis #2018
Read animation data from avataranimations.xml to allow default animations to be started and stopped by name from scripts.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user