Get rid of the pointless null checks on collision listeners. Add warning about synchronicity for PhysicsActor.OnCollisionUpdate event doc

0.7.2-post-fixes
Justin Clark-Casey (justincc) 2011-10-25 22:35:00 +01:00
parent 9f19405490
commit aba26c098d
3 changed files with 6 additions and 7 deletions

View File

@ -2083,10 +2083,6 @@ namespace OpenSim.Region.Framework.Scenes
public void PhysicsCollision(EventArgs e)
{
// single threaded here
if (e == null)
{
return;
}
CollisionEventUpdate a = (CollisionEventUpdate)e;
Dictionary<uint, ContactPoint> collissionswith = a.m_objCollisionList;

View File

@ -3346,9 +3346,6 @@ namespace OpenSim.Region.Framework.Scenes
// Event called by the physics plugin to tell the avatar about a collision.
private void PhysicsCollisionUpdate(EventArgs e)
{
if (e == null)
return;
//if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f))
// The Physics Scene will send updates every 500 ms grep: m_physicsActor.SubscribeEvents(
// as of this comment the interval is set in AddToPhysicalScene

View File

@ -140,7 +140,13 @@ namespace OpenSim.Region.Physics.Manager
public event VelocityUpdate OnVelocityUpdate;
public event OrientationUpdate OnOrientationUpdate;
public event RequestTerseUpdate OnRequestTerseUpdate;
/// <summary>
/// Subscribers to this event must synchronously handle the dictionary of collisions received, since the event
/// object is reused in subsequent physics frames.
/// </summary>
public event CollisionUpdate OnCollisionUpdate;
public event OutOfBounds OnOutOfBounds;
#pragma warning restore 67