aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs8
1 files changed, 6 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index 4f83adc..df95625 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -135,8 +135,11 @@ public abstract class BSPhysObject : PhysicsActor
135 // collision event to make collision_end work. 135 // collision event to make collision_end work.
136 // Called at taint time from within the Step() function thus no locking problems 136 // Called at taint time from within the Step() function thus no locking problems
137 // with CollisionCollection and ObjectsWithNoMoreCollisions. 137 // with CollisionCollection and ObjectsWithNoMoreCollisions.
138 public virtual void SendCollisions() 138 // Return 'true' if there were some actual collisions passed up
139 public virtual bool SendCollisions()
139 { 140 {
141 bool ret = true;
142
140 // throttle the collisions to the number of milliseconds specified in the subscription 143 // throttle the collisions to the number of milliseconds specified in the subscription
141 int nowTime = PhysicsScene.SimulationNowTime; 144 int nowTime = PhysicsScene.SimulationNowTime;
142 if (nowTime >= NextCollisionOkTime) 145 if (nowTime >= NextCollisionOkTime)
@@ -148,7 +151,7 @@ public abstract class BSPhysObject : PhysicsActor
148 if (CollisionCollection.Count == 0) 151 if (CollisionCollection.Count == 0)
149 { 152 {
150 // If I have no collisions this time, remove me from the list of objects with collisions. 153 // If I have no collisions this time, remove me from the list of objects with collisions.
151 PhysicsScene.ObjectsWithNoMoreCollisions.Add(this); 154 ret = false;
152 } 155 }
153 156
154 // DetailLog("{0},{1}.SendCollisionUpdate,call,numCollisions={2}", LocalID, TypeName, CollisionCollection.Count); 157 // DetailLog("{0},{1}.SendCollisionUpdate,call,numCollisions={2}", LocalID, TypeName, CollisionCollection.Count);
@@ -158,6 +161,7 @@ public abstract class BSPhysObject : PhysicsActor
158 // Make sure we don't have a handle to that one and that a new one is used for next time. 161 // Make sure we don't have a handle to that one and that a new one is used for next time.
159 CollisionCollection = new CollisionEventUpdate(); 162 CollisionCollection = new CollisionEventUpdate();
160 } 163 }
164 return ret;
161 } 165 }
162 166
163 // Subscribe for collision events. 167 // Subscribe for collision events.