Mantis #2018
Read animation data from avataranimations.xml to allow default animations to be started and stopped by name from scripts.0.6.0-stable
parent
ae9e4e8144
commit
8830b8b72c
|
@ -33,6 +33,7 @@ using System.Reflection;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Timers;
|
using System.Timers;
|
||||||
|
using System.Xml;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
using OpenMetaverse.Packets;
|
using OpenMetaverse.Packets;
|
||||||
using log4net;
|
using log4net;
|
||||||
|
@ -3478,6 +3479,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
|
|
||||||
private void InitDefaultAnimations()
|
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)
|
public UUID GetDefaultAnimation(string name)
|
||||||
|
|
|
@ -2660,9 +2660,6 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||||
animID=InventoryKey(anim);
|
animID=InventoryKey(anim);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (animID == UUID.Zero)
|
|
||||||
return;
|
|
||||||
|
|
||||||
ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter);
|
ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter);
|
||||||
|
|
||||||
if (presence != null)
|
if (presence != null)
|
||||||
|
|
|
@ -2497,9 +2497,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
animID=InventoryKey(anim);
|
animID=InventoryKey(anim);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (animID == UUID.Zero)
|
|
||||||
return;
|
|
||||||
|
|
||||||
ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter);
|
ScenePresence presence = World.GetScenePresence(m_host.TaskInventory[invItemID].PermsGranter);
|
||||||
|
|
||||||
if (presence != null)
|
if (presence != null)
|
||||||
|
|
Loading…
Reference in New Issue