aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-25 22:35:00 +0100
committerJustin Clark-Casey (justincc)2011-10-25 22:35:00 +0100
commitc825c9a94588e31c38ba43bf8ea763818e1c02b6 (patch)
tree7412953715b0777a18446a1482a7e786ce446b0a /OpenSim/Region
parentWhen sending object collision updates, don't null out and recreate the Collis... (diff)
downloadopensim-SC_OLD-c825c9a94588e31c38ba43bf8ea763818e1c02b6.zip
opensim-SC_OLD-c825c9a94588e31c38ba43bf8ea763818e1c02b6.tar.gz
opensim-SC_OLD-c825c9a94588e31c38ba43bf8ea763818e1c02b6.tar.bz2
opensim-SC_OLD-c825c9a94588e31c38ba43bf8ea763818e1c02b6.tar.xz
Get rid of the pointless null checks on collision listeners. Add warning about synchronicity for PhysicsActor.OnCollisionUpdate event doc
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SceneObjectPart.cs4
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs3
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsActor.cs6
3 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
index bee96d1..8b68102 100644
--- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
+++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs
@@ -2083,10 +2083,6 @@ namespace OpenSim.Region.Framework.Scenes
2083 public void PhysicsCollision(EventArgs e) 2083 public void PhysicsCollision(EventArgs e)
2084 { 2084 {
2085 // single threaded here 2085 // single threaded here
2086 if (e == null)
2087 {
2088 return;
2089 }
2090 2086
2091 CollisionEventUpdate a = (CollisionEventUpdate)e; 2087 CollisionEventUpdate a = (CollisionEventUpdate)e;
2092 Dictionary<uint, ContactPoint> collissionswith = a.m_objCollisionList; 2088 Dictionary<uint, ContactPoint> collissionswith = a.m_objCollisionList;
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index e685a2c..ee6c708 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -3296,9 +3296,6 @@ namespace OpenSim.Region.Framework.Scenes
3296 // Event called by the physics plugin to tell the avatar about a collision. 3296 // Event called by the physics plugin to tell the avatar about a collision.
3297 private void PhysicsCollisionUpdate(EventArgs e) 3297 private void PhysicsCollisionUpdate(EventArgs e)
3298 { 3298 {
3299 if (e == null)
3300 return;
3301
3302 //if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f)) 3299 //if ((Math.Abs(Velocity.X) > 0.1e-9f) || (Math.Abs(Velocity.Y) > 0.1e-9f))
3303 // The Physics Scene will send updates every 500 ms grep: PhysicsActor.SubscribeEvents( 3300 // The Physics Scene will send updates every 500 ms grep: PhysicsActor.SubscribeEvents(
3304 // as of this comment the interval is set in AddToPhysicalScene 3301 // as of this comment the interval is set in AddToPhysicalScene
diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
index 44af636..8f5abde 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs
@@ -140,7 +140,13 @@ namespace OpenSim.Region.Physics.Manager
140 public event VelocityUpdate OnVelocityUpdate; 140 public event VelocityUpdate OnVelocityUpdate;
141 public event OrientationUpdate OnOrientationUpdate; 141 public event OrientationUpdate OnOrientationUpdate;
142 public event RequestTerseUpdate OnRequestTerseUpdate; 142 public event RequestTerseUpdate OnRequestTerseUpdate;
143
144 /// <summary>
145 /// Subscribers to this event must synchronously handle the dictionary of collisions received, since the event
146 /// object is reused in subsequent physics frames.
147 /// </summary>
143 public event CollisionUpdate OnCollisionUpdate; 148 public event CollisionUpdate OnCollisionUpdate;
149
144 public event OutOfBounds OnOutOfBounds; 150 public event OutOfBounds OnOutOfBounds;
145#pragma warning restore 67 151#pragma warning restore 67
146 152