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

@ -1540,8 +1540,11 @@ namespace OpenSim.Region.Physics.OdePlugin
{
if (CollisionEventsThisFrame != null)
{
CollisionEventsThisFrame.Clear();
CollisionEventsThisFrame = null;
lock (CollisionEventsThisFrame)
{
CollisionEventsThisFrame.Clear();
CollisionEventsThisFrame = null;
}
}
m_eventsubscription = 0;
}
@ -1550,8 +1553,11 @@ namespace OpenSim.Region.Physics.OdePlugin
{
if (CollisionEventsThisFrame == null)
CollisionEventsThisFrame = new CollisionEventUpdate();
CollisionEventsThisFrame.AddCollider(CollidedWith, contact);
_parent_scene.AddCollisionEventReporting(this);
lock (CollisionEventsThisFrame)
{
CollisionEventsThisFrame.AddCollider(CollidedWith, contact);
_parent_scene.AddCollisionEventReporting(this);
}
}
public void SendCollisions()
@ -1559,26 +1565,29 @@ namespace OpenSim.Region.Physics.OdePlugin
if (CollisionEventsThisFrame == null)
return;
if (m_cureventsubscription < m_eventsubscription)
return;
m_cureventsubscription = 0;
int ncolisions = CollisionEventsThisFrame.m_objCollisionList.Count;
if (!SentEmptyCollisionsEvent || ncolisions > 0)
lock (CollisionEventsThisFrame)
{
base.SendCollisionUpdate(CollisionEventsThisFrame);
if (m_cureventsubscription < m_eventsubscription)
return;
if (ncolisions == 0)
m_cureventsubscription = 0;
int ncolisions = CollisionEventsThisFrame.m_objCollisionList.Count;
if (!SentEmptyCollisionsEvent || ncolisions > 0)
{
SentEmptyCollisionsEvent = true;
_parent_scene.RemoveCollisionEventReporting(this);
}
else
{
SentEmptyCollisionsEvent = false;
CollisionEventsThisFrame.Clear();
base.SendCollisionUpdate(CollisionEventsThisFrame);
if (ncolisions == 0)
{
SentEmptyCollisionsEvent = true;
_parent_scene.RemoveCollisionEventReporting(this);
}
else
{
SentEmptyCollisionsEvent = false;
CollisionEventsThisFrame.Clear();
}
}
}
}