aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs32
1 files changed, 7 insertions, 25 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
index 2f392da..1fbcfcc 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs
@@ -200,38 +200,20 @@ public class BSPrimLinkable : BSPrimDisplaced
200 } 200 }
201 201
202 // Called after a simulation step to post a collision with this object. 202 // Called after a simulation step to post a collision with this object.
203 // This returns 'true' if the collision has been queued and the SendCollisions call must
204 // be made at the end of the simulation step.
205 public override bool Collide(uint collidingWith, BSPhysObject collidee, 203 public override bool Collide(uint collidingWith, BSPhysObject collidee,
206 OMV.Vector3 contactPoint, OMV.Vector3 contactNormal, float pentrationDepth) 204 OMV.Vector3 contactPoint, OMV.Vector3 contactNormal, float pentrationDepth)
207 { 205 {
208 bool ret = false; 206 // prims in the same linkset cannot collide with each other
209 // Ask the linkset if it wants to handle the collision 207 BSPrimLinkable convCollidee = collidee as BSPrimLinkable;
210 if (!Linkset.HandleCollide(collidingWith, collidee, contactPoint, contactNormal, pentrationDepth)) 208 if (convCollidee != null && (this.Linkset.LinksetID == convCollidee.Linkset.LinksetID))
211 { 209 {
212 // The linkset didn't handle it so pass the collision through normal processing 210 return false;
213 ret = base.Collide(collidingWith, collidee, contactPoint, contactNormal, pentrationDepth);
214 } 211 }
215 return ret;
216 }
217 212
218 // A linkset reports any collision on any part of the linkset. 213 // TODO: handle collisions of other objects with with children of linkset.
219 public long SomeCollisionSimulationStep = 0; 214 // This is a problem for LinksetCompound since the children are packed into the root.
220 public override bool HasSomeCollision
221 {
222 get
223 {
224 return (SomeCollisionSimulationStep == PhysScene.SimulationStep) || base.IsColliding;
225 }
226 set
227 {
228 if (value)
229 SomeCollisionSimulationStep = PhysScene.SimulationStep;
230 else
231 SomeCollisionSimulationStep = 0;
232 215
233 base.HasSomeCollision = value; 216 return base.Collide(collidingWith, collidee, contactPoint, contactNormal, pentrationDepth);
234 }
235 } 217 }
236} 218}
237} 219}