Merge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork

avinationmerge
ubit 2013-01-02 21:07:47 +01:00
commit 94e7ccea99
1 changed files with 30 additions and 21 deletions

View File

@ -1539,10 +1539,13 @@ namespace OpenSim.Region.Physics.OdePlugin
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;
} }
@ -1550,15 +1553,20 @@ namespace OpenSim.Region.Physics.OdePlugin
{ {
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() public void SendCollisions()
{ {
if (CollisionEventsThisFrame == null) if (CollisionEventsThisFrame == null)
return; return;
lock (CollisionEventsThisFrame)
{
if (m_cureventsubscription < m_eventsubscription) if (m_cureventsubscription < m_eventsubscription)
return; return;
@ -1582,6 +1590,7 @@ namespace OpenSim.Region.Physics.OdePlugin
} }
} }
} }
}
internal void AddCollisionFrameTime(int t) internal void AddCollisionFrameTime(int t)
{ {