* Object tracker dictionaries are now internal and only accessible through various methods and properties to prevent locking disasters. Basis of this code written by jradford in issue 342

* Added a Client.Self.Name property for the full name of the avatar which does smart caching
* Adds BackupCommand to TestClient (submitted by CheechBode in issue 314), backs up notecards and scripts from your inventory to hard drive. Needs more refining but it works
* Parsing problems in TestClient no longer crash the app

git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1378 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
John Hurliman
2007-08-29 08:55:53 +00:00
parent 92e460a066
commit 349830c983
21 changed files with 777 additions and 246 deletions

View File

@@ -48,17 +48,18 @@ namespace libsecondlife.TestClient
{
for (int i = 0; i < Client.Network.Simulators.Count; i++)
{
lock (Client.Network.Simulators[i].Objects.Avatars)
{
foreach (Avatar avatar in Client.Network.Simulators[i].Objects.Avatars.Values)
Avatar target = Client.Network.Simulators[i].Objects.Find(
delegate(Avatar avatar)
{
if (avatar.Name == name)
{
targetLocalID = avatar.LocalID;
Active = true;
return true;
}
return avatar.Name == name;
}
);
if (target != null)
{
targetLocalID = target.LocalID;
Active = true;
return true;
}
}
}
@@ -73,17 +74,18 @@ namespace libsecondlife.TestClient
{
for (int i = 0; i < Client.Network.Simulators.Count; i++)
{
lock (Client.Network.Simulators[i].Objects.Avatars)
{
foreach (Avatar avatar in Client.Network.Simulators[i].Objects.Avatars.Values)
Avatar target = Client.Network.Simulators[i].Objects.Find(
delegate(Avatar avatar)
{
if (avatar.ID == id)
{
targetLocalID = avatar.LocalID;
Active = true;
return true;
}
return avatar.ID == id;
}
);
if (target != null)
{
targetLocalID = target.LocalID;
Active = true;
return true;
}
}
}
@@ -99,9 +101,10 @@ namespace libsecondlife.TestClient
{
for (int i = 0; i < Client.Network.Simulators.Count; i++)
{
if (Client.Network.Simulators[i].Objects.Avatars.ContainsKey(targetLocalID))
Avatar targetAv;
if (Client.Network.Simulators[i].Objects.TryGetAvatar(targetLocalID, out targetAv))
{
Avatar targetAv = Client.Network.Simulators[i].Objects.Avatars[targetLocalID];
float distance = 0.0f;
if (Client.Network.Simulators[i] == Client.Network.CurrentSim)