did I say I was doing some rearranging?

Sugilite
MW 2007-06-12 15:10:05 +00:00
parent 4d217ca196
commit d02d925c86
3 changed files with 34 additions and 31 deletions

View File

@ -157,15 +157,15 @@
<Compile Include="World\Entities\SceneObject.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="World\Entities\Avatar\Avatar.Animations.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="World\Entities\Avatar\Avatar.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="World\Entities\Avatar\Avatar.Update.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="World\Entities\Avatar\AvatarAnimations.cs">
<SubType>Code</SubType>
</Compile>
<Compile Include="World\scripting\IScriptContext.cs">
<SubType>Code</SubType>
</Compile>

View File

@ -20,9 +20,9 @@
<include name="World/Entities/Entity.cs" />
<include name="World/Entities/Primitive.cs" />
<include name="World/Entities/SceneObject.cs" />
<include name="World/Entities/Avatar/Avatar.Animations.cs" />
<include name="World/Entities/Avatar/Avatar.cs" />
<include name="World/Entities/Avatar/Avatar.Update.cs" />
<include name="World/Entities/Avatar/AvatarAnimations.cs" />
<include name="World/scripting/IScriptContext.cs" />
<include name="World/scripting/IScriptEntity.cs" />
<include name="World/scripting/IScriptHandler.cs" />

View File

@ -33,40 +33,43 @@ using System.Xml;
namespace OpenSim.Region
{
public class AvatarAnimations
partial class Avatar
{
public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>();
public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>();
public AvatarAnimations()
public class AvatarAnimations
{
}
public void LoadAnims()
{
//OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:LoadAnims() - Loading avatar animations");
XmlTextReader reader = new XmlTextReader("data/avataranimations.xml");
public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>();
public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>();
XmlDocument doc = new XmlDocument();
doc.Load(reader);
foreach (XmlNode nod in doc.DocumentElement.ChildNodes)
public AvatarAnimations()
{
if ( nod.Attributes["name"] != null)
{
AnimsLLUUID.Add(nod.Attributes["name"].Value, nod.InnerText);
}
}
reader.Close();
// OpenSim.Framework.Console.MainConsole.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)");
foreach (KeyValuePair<string, LLUUID> kp in OpenSim.Region.Avatar.Animations.AnimsLLUUID)
public void LoadAnims()
{
AnimsNames.Add(kp.Value, kp.Key);
//OpenSim.Framework.Console.MainConsole.Instance.Verbose("Avatar.cs:LoadAnims() - Loading avatar animations");
XmlTextReader reader = new XmlTextReader("data/avataranimations.xml");
XmlDocument doc = new XmlDocument();
doc.Load(reader);
foreach (XmlNode nod in doc.DocumentElement.ChildNodes)
{
if (nod.Attributes["name"] != null)
{
AnimsLLUUID.Add(nod.Attributes["name"].Value, nod.InnerText);
}
}
reader.Close();
// OpenSim.Framework.Console.MainConsole.Instance.Verbose("Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)");
foreach (KeyValuePair<string, LLUUID> kp in OpenSim.Region.Avatar.Animations.AnimsLLUUID)
{
AnimsNames.Add(kp.Value, kp.Key);
}
}
}
}