aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Scenes/AvatarAnimations.cs (renamed from OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs)51
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs2
2 files changed, 26 insertions, 27 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs
index f016ac2..d508c9e 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
+++ b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs
@@ -28,42 +28,41 @@
28using System.Collections.Generic; 28using System.Collections.Generic;
29using System.Xml; 29using System.Xml;
30using libsecondlife; 30using libsecondlife;
31using libsecondlife.Packets;
32
31 33
32namespace OpenSim.Region.Environment.Scenes 34namespace OpenSim.Region.Environment.Scenes
33{ 35{
34 partial class ScenePresence 36 public class AvatarAnimations
35 { 37 {
36 public class AvatarAnimations 38 public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>();
39 public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>();
40
41 public AvatarAnimations()
37 { 42 {
38 public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>(); 43 }
39 public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>(); 44
40 45 public void LoadAnims()
41 public AvatarAnimations() 46 {
42 { 47 //MainLog.Instance.Verbose("CLIENT", "Loading avatar animations");
43 } 48 using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"))
44
45 public void LoadAnims()
46 { 49 {
47 //MainLog.Instance.Verbose("CLIENT", "Loading avatar animations"); 50 XmlDocument doc = new XmlDocument();
48 using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml")) 51 doc.Load(reader);
52 foreach (XmlNode nod in doc.DocumentElement.ChildNodes)
49 { 53 {
50 XmlDocument doc = new XmlDocument(); 54 if (nod.Attributes["name"] != null)
51 doc.Load(reader);
52 foreach (XmlNode nod in doc.DocumentElement.ChildNodes)
53 { 55 {
54 if (nod.Attributes["name"] != null) 56 AnimsLLUUID.Add(nod.Attributes["name"].Value, nod.InnerText);
55 {
56 AnimsLLUUID.Add(nod.Attributes["name"].Value, nod.InnerText);
57 }
58 } 57 }
59 } 58 }
60 59 }
61 // MainLog.Instance.Verbose("CLIENT", "Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); 60
62 61 // MainLog.Instance.Verbose("CLIENT", "Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)");
63 foreach (KeyValuePair<string, LLUUID> kp in Animations.AnimsLLUUID) 62
64 { 63 foreach (KeyValuePair<string, LLUUID> kp in ScenePresence.Animations.AnimsLLUUID)
65 AnimsNames.Add(kp.Value, kp.Key); 64 {
66 } 65 AnimsNames.Add(kp.Value, kp.Key);
67 } 66 }
68 } 67 }
69 } 68 }
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 0640067..512eed0 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -38,7 +38,7 @@ using OpenSim.Region.Physics.Manager;
38 38
39namespace OpenSim.Region.Environment.Scenes 39namespace OpenSim.Region.Environment.Scenes
40{ 40{
41 public partial class ScenePresence : EntityBase 41 public class ScenePresence : EntityBase
42 { 42 {
43 public static AvatarAnimations Animations; 43 public static AvatarAnimations Animations;
44 public static byte[] DefaultTexture; 44 public static byte[] DefaultTexture;