aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
diff options
context:
space:
mode:
authorlbsa712007-09-21 05:23:17 +0000
committerlbsa712007-09-21 05:23:17 +0000
commit5fab795bf0fd3fe794e4635fc28b295963cfbb9e (patch)
treef2e344108680b593b53d00b5e183f1641e20c1ed /OpenSim/Region/Environment/Scenes/ScenePresence.Animations.cs
parent* Removed unused RegenerateTerrain functions (diff)
downloadopensim-SC-5fab795bf0fd3fe794e4635fc28b295963cfbb9e.zip
opensim-SC-5fab795bf0fd3fe794e4635fc28b295963cfbb9e.tar.gz
opensim-SC-5fab795bf0fd3fe794e4635fc28b295963cfbb9e.tar.bz2
opensim-SC-5fab795bf0fd3fe794e4635fc28b295963cfbb9e.tar.xz
* Continued work on Region layer
* Added Close() to ScenePresence to remove and destroy PhysicsActor
Diffstat (limited to '')
-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