* 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.
parent
89665faeaf
commit
640ad259d4
|
@ -139,10 +139,9 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
|
|
||||||
if (handler != null)
|
if (handler != null)
|
||||||
{
|
{
|
||||||
lock (handler)
|
|
||||||
{
|
|
||||||
handler();
|
handler();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,25 +152,19 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
// immediately after the null check and before the event is raised.
|
// immediately after the null check and before the event is raised.
|
||||||
OutOfBounds handler = OnOutOfBounds;
|
OutOfBounds handler = OnOutOfBounds;
|
||||||
if (handler != null)
|
if (handler != null)
|
||||||
{
|
|
||||||
lock (handler)
|
|
||||||
{
|
{
|
||||||
handler(pos);
|
handler(pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public virtual void SendCollisionUpdate(EventArgs e)
|
public virtual void SendCollisionUpdate(EventArgs e)
|
||||||
{
|
{
|
||||||
CollisionUpdate handler = OnCollisionUpdate;
|
CollisionUpdate handler = OnCollisionUpdate;
|
||||||
|
|
||||||
if (handler != null)
|
if (handler != null)
|
||||||
{
|
|
||||||
lock (handler)
|
|
||||||
{
|
{
|
||||||
handler(e);
|
handler(e);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1272,6 +1272,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
{
|
{
|
||||||
foreach (OdeCharacter actor in _characters)
|
foreach (OdeCharacter actor in _characters)
|
||||||
{
|
{
|
||||||
|
if (actor != null)
|
||||||
actor.Move(timeStep);
|
actor.Move(timeStep);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1300,6 +1301,7 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||||
|
|
||||||
foreach (OdeCharacter actor in _characters)
|
foreach (OdeCharacter actor in _characters)
|
||||||
{
|
{
|
||||||
|
if (actor != null)
|
||||||
actor.UpdatePositionAndVelocity();
|
actor.UpdatePositionAndVelocity();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue