* Moved all simulator statistic information to a new struct at Simulator.Stats
* Added per-sim avatar and prim tracking through Simulator.Objects, use Settings.ALWAYS_DECODE_OBJECTS = true to enable * Handle DisconnectSim packet and don't send CloseCircuit packets on sim-triggered disconnects * Interpolation timer now does angular velocity and linear movement interpolation for all objects in the object tracker(s) git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@1363 52acb1d6-8a22-11de-b505-999d5b087335
This commit is contained in:
@@ -19,19 +19,16 @@ namespace libsecondlife.TestClient
|
||||
Primitive closest = null;
|
||||
double closestDistance = Double.MaxValue;
|
||||
|
||||
lock (Client.SimPrims)
|
||||
lock (Client.Network.CurrentSim.Objects.Prims)
|
||||
{
|
||||
if (Client.SimPrims.ContainsKey(Client.Network.CurrentSim))
|
||||
foreach (Primitive p in Client.Network.CurrentSim.Objects.Prims.Values)
|
||||
{
|
||||
foreach (Primitive p in Client.SimPrims[Client.Network.CurrentSim].Values)
|
||||
{
|
||||
float distance = Helpers.VecDist(Client.Self.Position, p.Position);
|
||||
float distance = Helpers.VecDist(Client.Self.Position, p.Position);
|
||||
|
||||
if (closest == null || distance < closestDistance)
|
||||
{
|
||||
closest = p;
|
||||
closestDistance = distance;
|
||||
}
|
||||
if (closest == null || distance < closestDistance)
|
||||
{
|
||||
closest = p;
|
||||
closestDistance = distance;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user