BulletSim: fix the trimming of colliders so only the top 25 are returned.

user_profiles
Robert Adams 2013-01-28 09:02:01 -08:00
parent 2cd56014a7
commit f6380a3ad3
2 changed files with 4 additions and 4 deletions

View File

@ -708,8 +708,8 @@ public sealed class BSScene : PhysicsScene, IPhysicsParameters
}
List<BSPhysObject> orderedPrims = new List<BSPhysObject>(PhysObjects.Values);
orderedPrims.OrderByDescending(p => p.CollisionScore).Take(25);
topColliders = orderedPrims.ToDictionary(p => p.LocalID, p => p.CollisionScore);
orderedPrims.OrderByDescending(p => p.CollisionScore);
topColliders = orderedPrims.Take(25).ToDictionary(p => p.LocalID, p => p.CollisionScore);
}
return topColliders;

View File

@ -4096,8 +4096,8 @@ namespace OpenSim.Region.Physics.OdePlugin
lock (_prims)
{
List<OdePrim> orderedPrims = new List<OdePrim>(_prims);
orderedPrims.OrderByDescending(p => p.CollisionScore).Take(25);
topColliders = orderedPrims.ToDictionary(p => p.LocalID, p => p.CollisionScore);
orderedPrims.OrderByDescending(p => p.CollisionScore);
topColliders = orderedPrims.Take(25).ToDictionary(p => p.LocalID, p => p.CollisionScore);
foreach (OdePrim p in _prims)
p.CollisionScore = 0;