From c45659863d8821a48a32e5b687c7b2a6d90b0300 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Mon, 22 Jul 2013 12:09:17 -0700 Subject: Revert "BulletSim: move collision processing for linksets from BSPrimLinkable" The changes don't seem to be ready for prime time. This reverts commit b4c3a791aa55390bff071b3fe4bbe70c1d252703. --- .../Region/Physics/BulletSPlugin/BSPrimLinkable.cs | 32 +++++----------------- 1 file changed, 7 insertions(+), 25 deletions(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPrimLinkable.cs') 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 } // Called after a simulation step to post a collision with this object. - // This returns 'true' if the collision has been queued and the SendCollisions call must - // be made at the end of the simulation step. public override bool Collide(uint collidingWith, BSPhysObject collidee, OMV.Vector3 contactPoint, OMV.Vector3 contactNormal, float pentrationDepth) { - bool ret = false; - // Ask the linkset if it wants to handle the collision - if (!Linkset.HandleCollide(collidingWith, collidee, contactPoint, contactNormal, pentrationDepth)) + // prims in the same linkset cannot collide with each other + BSPrimLinkable convCollidee = collidee as BSPrimLinkable; + if (convCollidee != null && (this.Linkset.LinksetID == convCollidee.Linkset.LinksetID)) { - // The linkset didn't handle it so pass the collision through normal processing - ret = base.Collide(collidingWith, collidee, contactPoint, contactNormal, pentrationDepth); + return false; } - return ret; - } - // A linkset reports any collision on any part of the linkset. - public long SomeCollisionSimulationStep = 0; - public override bool HasSomeCollision - { - get - { - return (SomeCollisionSimulationStep == PhysScene.SimulationStep) || base.IsColliding; - } - set - { - if (value) - SomeCollisionSimulationStep = PhysScene.SimulationStep; - else - SomeCollisionSimulationStep = 0; + // TODO: handle collisions of other objects with with children of linkset. + // This is a problem for LinksetCompound since the children are packed into the root. - base.HasSomeCollision = value; - } + return base.Collide(collidingWith, collidee, contactPoint, contactNormal, pentrationDepth); } } } -- cgit v1.1