* A few additional null checks in the Physics Scene and PhysicsActor so we don't try to enumerate dead null ODECharacter objects when things get *really* slow.

This commit is contained in:
Teravus Ovares
2008-02-21 14:51:39 +00:00
parent 89665faeaf
commit 640ad259d4
2 changed files with 6 additions and 11 deletions

View File

@@ -139,10 +139,9 @@ namespace OpenSim.Region.Physics.Manager
if (handler != null)
{
lock (handler)
{
handler();
}
}
}
@@ -154,10 +153,7 @@ namespace OpenSim.Region.Physics.Manager
OutOfBounds handler = OnOutOfBounds;
if (handler != null)
{
lock (handler)
{
handler(pos);
}
}
}
@@ -167,10 +163,7 @@ namespace OpenSim.Region.Physics.Manager
if (handler != null)
{
lock (handler)
{
handler(e);
}
}
}

View File

@@ -1272,7 +1272,8 @@ namespace OpenSim.Region.Physics.OdePlugin
{
foreach (OdeCharacter actor in _characters)
{
actor.Move(timeStep);
if (actor != null)
actor.Move(timeStep);
}
collision_optimized(timeStep);
@@ -1300,7 +1301,8 @@ namespace OpenSim.Region.Physics.OdePlugin
foreach (OdeCharacter actor in _characters)
{
actor.UpdatePositionAndVelocity();
if (actor != null)
actor.UpdatePositionAndVelocity();
}
if (!ode.lockquery())