ubOde: add a needed lock
parent
743a9d617e
commit
58b7be48a9
|
@ -1221,8 +1221,11 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
/// <param name="obj"></param>
|
/// <param name="obj"></param>
|
||||||
public void RemoveCollisionEventReporting(PhysicsActor obj)
|
public void RemoveCollisionEventReporting(PhysicsActor obj)
|
||||||
{
|
{
|
||||||
if (_collisionEventPrim.Contains(obj) && !_collisionEventPrimRemove.Contains(obj))
|
lock(_collisionEventPrimRemove)
|
||||||
_collisionEventPrimRemove.Add(obj);
|
{
|
||||||
|
if (_collisionEventPrim.Contains(obj) && !_collisionEventPrimRemove.Contains(obj))
|
||||||
|
_collisionEventPrimRemove.Add(obj);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override float TimeDilation
|
public override float TimeDilation
|
||||||
|
@ -1759,10 +1762,13 @@ namespace OpenSim.Region.PhysicsModule.ubOde
|
||||||
prm.SleeperAddCollisionEvents();
|
prm.SleeperAddCollisionEvents();
|
||||||
sleepers.Clear();
|
sleepers.Clear();
|
||||||
|
|
||||||
foreach (PhysicsActor obj in _collisionEventPrimRemove)
|
lock(_collisionEventPrimRemove)
|
||||||
_collisionEventPrim.Remove(obj);
|
{
|
||||||
|
foreach (PhysicsActor obj in _collisionEventPrimRemove)
|
||||||
|
_collisionEventPrim.Remove(obj);
|
||||||
|
|
||||||
_collisionEventPrimRemove.Clear();
|
_collisionEventPrimRemove.Clear();
|
||||||
|
}
|
||||||
|
|
||||||
// do a ode simulation step
|
// do a ode simulation step
|
||||||
d.WorldQuickStep(world, ODE_STEPSIZE);
|
d.WorldQuickStep(world, ODE_STEPSIZE);
|
||||||
|
|
Loading…
Reference in New Issue