Get rid of the pointless null checks on collision listeners. Add warning about synchronicity for PhysicsActor.OnCollisionUpdate event doc
parent
9f19405490
commit
aba26c098d
|
@ -2083,10 +2083,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
public void PhysicsCollision(EventArgs e)
|
public void PhysicsCollision(EventArgs e)
|
||||||
{
|
{
|
||||||
// single threaded here
|
// single threaded here
|
||||||
if (e == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
CollisionEventUpdate a = (CollisionEventUpdate)e;
|
CollisionEventUpdate a = (CollisionEventUpdate)e;
|
||||||
Dictionary<uint, ContactPoint> collissionswith = a.m_objCollisionList;
|
Dictionary<uint, ContactPoint> collissionswith = a.m_objCollisionList;
|
||||||
|
|
|
@ -3346,9 +3346,6 @@ namespace OpenSim.Region.Framework.Scenes
|
||||||
// Event called by the physics plugin to tell the avatar about a collision.
|
// Event called by the physics plugin to tell the avatar about a collision.
|
||||||
private void PhysicsCollisionUpdate(EventArgs e)
|
private void PhysicsCollisionUpdate(EventArgs e)
|
||||||
{
|
{
|
||||||
if (e == null)
|
|
||||||
return;
|
|
||||||
|
|
||||||
//if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f))
|
//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(
|
// The Physics Scene will send updates every 500 ms grep: m_physicsActor.SubscribeEvents(
|
||||||
// as of this comment the interval is set in AddToPhysicalScene
|
// as of this comment the interval is set in AddToPhysicalScene
|
||||||
|
|
|
@ -140,7 +140,13 @@ namespace OpenSim.Region.Physics.Manager
|
||||||
public event VelocityUpdate OnVelocityUpdate;
|
public event VelocityUpdate OnVelocityUpdate;
|
||||||
public event OrientationUpdate OnOrientationUpdate;
|
public event OrientationUpdate OnOrientationUpdate;
|
||||||
public event RequestTerseUpdate OnRequestTerseUpdate;
|
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 CollisionUpdate OnCollisionUpdate;
|
||||||
|
|
||||||
public event OutOfBounds OnOutOfBounds;
|
public event OutOfBounds OnOutOfBounds;
|
||||||
#pragma warning restore 67
|
#pragma warning restore 67
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue