mirror of
https://github.com/opensim/opensim.git
synced 2026-08-08 18:25:33 +08:00
XEngine: fix collisions, add event coalescing for collision events.
Fix a nasty concurrency issue that could cause a high event frequency to start more than one thread pool job for a single script.
This commit is contained in:
@@ -2294,14 +2294,12 @@ namespace OpenSim.Region.Physics.OdePlugin
|
||||
if (CollisionEventsThisFrame == null)
|
||||
return;
|
||||
|
||||
//if (CollisionEventsThisFrame.m_objCollisionList == null)
|
||||
// return;
|
||||
base.SendCollisionUpdate(CollisionEventsThisFrame);
|
||||
|
||||
if (CollisionEventsThisFrame.m_objCollisionList.Count > 0)
|
||||
{
|
||||
base.SendCollisionUpdate(CollisionEventsThisFrame);
|
||||
if(CollisionEventsThisFrame.m_objCollisionList.Count == 0)
|
||||
CollisionEventsThisFrame = null;
|
||||
else
|
||||
CollisionEventsThisFrame = new CollisionEventUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool SubscribedEvents()
|
||||
|
||||
Reference in New Issue
Block a user