remove unnecessary lock

LSLKeyTest
UbitUmarov 2016-08-22 07:32:12 +01:00
parent 2d4d1adb4d
commit 3abd54082f
1 changed files with 21 additions and 31 deletions

View File

@ -122,7 +122,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
private float m_buoyancy = 0f;
private bool m_freemove = false;
// private CollisionLocker ode;
// private string m_name = String.Empty;
// other filter control
@ -1570,13 +1569,10 @@ namespace OpenSim.Region.PhysicsModule.ubOde
public override void UnSubscribeEvents()
{
if (CollisionEventsThisFrame != null)
{
lock (CollisionEventsThisFrame)
{
CollisionEventsThisFrame.Clear();
CollisionEventsThisFrame = null;
}
}
m_eventsubscription = 0;
_parent_scene.RemoveCollisionEventReporting(this);
}
@ -1585,12 +1581,9 @@ namespace OpenSim.Region.PhysicsModule.ubOde
{
if (CollisionEventsThisFrame == null)
CollisionEventsThisFrame = new CollisionEventUpdate();
lock (CollisionEventsThisFrame)
{
CollisionEventsThisFrame.AddCollider(CollidedWith, contact);
_parent_scene.AddCollisionEventReporting(this);
}
}
public void SendCollisions(int timestep)
{
@ -1600,8 +1593,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
if (CollisionEventsThisFrame == null)
return;
lock (CollisionEventsThisFrame)
{
if (m_cureventsubscription < m_eventsubscription)
return;
@ -1624,7 +1615,6 @@ namespace OpenSim.Region.PhysicsModule.ubOde
}
}
}
}
public override bool SubscribedEvents()
{