aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs26
1 files changed, 17 insertions, 9 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
index e8f29c8..168a60e 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
@@ -45,20 +45,19 @@ namespace OpenSim.Region.Environment.Scenes
45 public void LoadAnims() 45 public void LoadAnims()
46 { 46 {
47 //OpenSim.Framework.Console.MainLog.Instance.Verbose("Avatar.cs:LoadAnims() - Loading avatar animations"); 47 //OpenSim.Framework.Console.MainLog.Instance.Verbose("Avatar.cs:LoadAnims() - Loading avatar animations");
48 XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"); 48 using( XmlTextReader reader = new XmlTextReader("data/avataranimations.xml") )
49
50 XmlDocument doc = new XmlDocument();
51 doc.Load(reader);
52 foreach (XmlNode nod in doc.DocumentElement.ChildNodes)
53 { 49 {
54 if (nod.Attributes["name"] != null) 50 XmlDocument doc = new XmlDocument();
51 doc.Load(reader);
52 foreach (XmlNode nod in doc.DocumentElement.ChildNodes)
55 { 53 {
56 AnimsLLUUID.Add(nod.Attributes["name"].Value, nod.InnerText); 54 if (nod.Attributes["name"] != null)
55 {
56 AnimsLLUUID.Add(nod.Attributes["name"].Value, nod.InnerText);
57 }
57 } 58 }
58 } 59 }
59 60
60 reader.Close();
61
62 // OpenSim.Framework.Console.MainLog.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); 61 // OpenSim.Framework.Console.MainLog.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)");
63 62
64 foreach (KeyValuePair<string, LLUUID> kp in Animations.AnimsLLUUID) 63 foreach (KeyValuePair<string, LLUUID> kp in Animations.AnimsLLUUID)
@@ -67,5 +66,14 @@ namespace OpenSim.Region.Environment.Scenes
67 } 66 }
68 } 67 }
69 } 68 }
69
70 internal void Close()
71 {
72 if (m_physicsActor != null)
73 {
74 m_scene.PhysScene.RemoveAvatar( PhysicsActor );
75 m_physicsActor = null;
76 }
77 }
70 } 78 }
71} \ No newline at end of file 79} \ No newline at end of file