For ScenePresence collision events, instead of creating a new CollisionEventsThisFrame every time we need to send some new ones, reuse the existing one instead.
This assumes that the listener is using the data synchronously, which is currently the case.0.7.2-post-fixes
parent
057b78bfbe
commit
871f1d0ae7
|
@ -2248,6 +2248,7 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
});
|
||||
}
|
||||
}
|
||||
|
||||
if (colliding.Count > 0)
|
||||
{
|
||||
StartCollidingMessage.Colliders = colliding;
|
||||
|
@ -2255,10 +2256,11 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
if (m_parentGroup.Scene == null)
|
||||
return;
|
||||
|
||||
if (m_parentGroup.PassCollision == true)
|
||||
{
|
||||
//TODO: Add pass to root prim!
|
||||
}
|
||||
// if (m_parentGroup.PassCollision == true)
|
||||
// {
|
||||
// //TODO: Add pass to root prim!
|
||||
// }
|
||||
|
||||
m_parentGroup.Scene.EventManager.TriggerScriptCollidingStart(LocalId, StartCollidingMessage);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -113,6 +113,14 @@ namespace OpenSim.Region.Physics.Manager
|
|||
m_objCollisionList[localID] = contact;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clear added collision events.
|
||||
/// </summary>
|
||||
public void Clear()
|
||||
{
|
||||
m_objCollisionList.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public abstract class PhysicsActor
|
||||
|
|
|
@ -1235,11 +1235,9 @@ namespace OpenSim.Region.Physics.OdePlugin
|
|||
{
|
||||
if (m_eventsubscription > m_requestedUpdateFrequency)
|
||||
{
|
||||
if (CollisionEventsThisFrame != null)
|
||||
{
|
||||
base.SendCollisionUpdate(CollisionEventsThisFrame);
|
||||
}
|
||||
CollisionEventsThisFrame = new CollisionEventUpdate();
|
||||
base.SendCollisionUpdate(CollisionEventsThisFrame);
|
||||
|
||||
CollisionEventsThisFrame.Clear();
|
||||
m_eventsubscription = 0;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue