mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 03:45:35 +08:00
* 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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user