diff options
author | Adam Frisby | 2007-06-04 12:05:18 +0000 |
---|---|---|
committer | Adam Frisby | 2007-06-04 12:05:18 +0000 |
commit | 7554af993ff6461b66f9db5c3fb7c28d340c6286 (patch) | |
tree | a00b34009f5d213e194d9a593a206dbb012a2bab | |
parent | Added support for bitmap and image loading to libterrain, use "terrain load i... (diff) | |
download | opensim-SC_OLD-7554af993ff6461b66f9db5c3fb7c28d340c6286.zip opensim-SC_OLD-7554af993ff6461b66f9db5c3fb7c28d340c6286.tar.gz opensim-SC_OLD-7554af993ff6461b66f9db5c3fb7c28d340c6286.tar.bz2 opensim-SC_OLD-7554af993ff6461b66f9db5c3fb7c28d340c6286.tar.xz |
* Loading animations from XML file now
Diffstat (limited to '')
-rw-r--r-- | OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs b/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs index adf49f2..f4c50a7 100644 --- a/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs +++ b/OpenSim/OpenSim.RegionServer/world/AvatarAnimations.cs | |||
@@ -2,6 +2,7 @@ using System; | |||
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using System.Text; |
4 | using libsecondlife; | 4 | using libsecondlife; |
5 | using System.Xml; | ||
5 | 6 | ||
6 | namespace OpenSim.world | 7 | namespace OpenSim.world |
7 | { | 8 | { |
@@ -18,6 +19,21 @@ namespace OpenSim.world | |||
18 | public void LoadAnims() | 19 | public void LoadAnims() |
19 | { | 20 | { |
20 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Avatar.cs:LoadAnims() - Loading avatar animations"); | 21 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Avatar.cs:LoadAnims() - Loading avatar animations"); |
22 | XmlTextReader reader = new XmlTextReader("data/avataranimations.xml"); | ||
23 | XmlDocument doc = new XmlDocument(); | ||
24 | doc.Load(reader); | ||
25 | |||
26 | foreach (XmlNode nod in doc.FirstChild.ChildNodes) | ||
27 | { | ||
28 | if (nod.Attributes["name"] != null) | ||
29 | { | ||
30 | AnimsLLUUID.Add(nod.Attributes["name"], nod.Value); | ||
31 | } | ||
32 | } | ||
33 | |||
34 | reader.Close(); | ||
35 | |||
36 | OpenSim.Framework.Console.MainConsole.Instance.WriteLine(OpenSim.Framework.Console.LogPriority.LOW,"Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); | ||
21 | 37 | ||
22 | foreach (KeyValuePair<string, LLUUID> kp in OpenSim.world.Avatar.Animations.AnimsLLUUID) | 38 | foreach (KeyValuePair<string, LLUUID> kp in OpenSim.world.Avatar.Animations.AnimsLLUUID) |
23 | { | 39 | { |