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