diff options
author | Melanie Thielker | 2008-09-13 19:51:56 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-13 19:51:56 +0000 |
commit | 8830b8b72cd53af8ed0383ab3247e23dab87776e (patch) | |
tree | 01eae3b0950712996f461224e46e1da28fd05ebd /OpenSim/Region/ClientStack/LindenUDP | |
parent | Update avatar-position while avatar is sitting and the prim is moved (#2159). (diff) | |
download | opensim-SC_OLD-8830b8b72cd53af8ed0383ab3247e23dab87776e.zip opensim-SC_OLD-8830b8b72cd53af8ed0383ab3247e23dab87776e.tar.gz opensim-SC_OLD-8830b8b72cd53af8ed0383ab3247e23dab87776e.tar.bz2 opensim-SC_OLD-8830b8b72cd53af8ed0383ab3247e23dab87776e.tar.xz |
Mantis #2018
Read animation data from avataranimations.xml to allow default animations
to be started and stopped by name from scripts.
Diffstat (limited to 'OpenSim/Region/ClientStack/LindenUDP')
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 15 |
1 files changed, 15 insertions, 0 deletions
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; | |||
33 | using System.Text; | 33 | using System.Text; |
34 | using System.Threading; | 34 | using System.Threading; |
35 | using System.Timers; | 35 | using System.Timers; |
36 | using System.Xml; | ||
36 | using OpenMetaverse; | 37 | using OpenMetaverse; |
37 | using OpenMetaverse.Packets; | 38 | using OpenMetaverse.Packets; |
38 | using log4net; | 39 | using log4net; |
@@ -3478,6 +3479,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
3478 | 3479 | ||
3479 | private void InitDefaultAnimations() | 3480 | private void InitDefaultAnimations() |
3480 | { | 3481 | { |
3482 | using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml")) | ||
3483 | { | ||
3484 | XmlDocument doc = new XmlDocument(); | ||
3485 | doc.Load(reader); | ||
3486 | foreach (XmlNode nod in doc.DocumentElement.ChildNodes) | ||
3487 | { | ||
3488 | if (nod.Attributes["name"] != null) | ||
3489 | { | ||
3490 | string name = (string)nod.Attributes["name"].Value.ToLower(); | ||
3491 | string id = (string)nod.InnerText; | ||
3492 | m_defaultAnimations.Add(name, id); | ||
3493 | } | ||
3494 | } | ||
3495 | } | ||
3481 | } | 3496 | } |
3482 | 3497 | ||
3483 | public UUID GetDefaultAnimation(string name) | 3498 | public UUID GetDefaultAnimation(string name) |