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