aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
diff options
context:
space:
mode:
authorRobert Adams2012-12-10 15:35:53 -0800
committerRobert Adams2012-12-10 15:35:53 -0800
commit9df85eadf4b3719a898fda8769313ae023962c25 (patch)
treeaf055fb53368d75c236959bfde56d43f23e6f741 /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
parentBulletSim: some comments about rebuilding linksets (having to recompute and r... (diff)
downloadopensim-SC_OLD-9df85eadf4b3719a898fda8769313ae023962c25.zip
opensim-SC_OLD-9df85eadf4b3719a898fda8769313ae023962c25.tar.gz
opensim-SC_OLD-9df85eadf4b3719a898fda8769313ae023962c25.tar.bz2
opensim-SC_OLD-9df85eadf4b3719a898fda8769313ae023962c25.tar.xz
BulletSim: Fix crash on the destruction of physical linksets.
While fixing the above, add methods to physical body and shape pointer wrapper so routines won't have to know that IntPtr.Zero means no physical instance. Fix problem with physical linksets failing after a few sits and unsits by properly restoring child prom positions for compound linksets after multiple selection and deselections.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs')
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs5
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index b05d4ee..d2fc15c 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -75,6 +75,7 @@ public abstract class BSPhysObject : PhysicsActor
75 public string TypeName { get; protected set; } 75 public string TypeName { get; protected set; }
76 76
77 public BSLinkset Linkset { get; set; } 77 public BSLinkset Linkset { get; set; }
78 public BSLinksetInfo LinksetInfo { get; set; }
78 79
79 // Return the object mass without calculating it or having side effects 80 // Return the object mass without calculating it or having side effects
80 public abstract float RawMass { get; } 81 public abstract float RawMass { get; }
@@ -253,7 +254,9 @@ public abstract class BSPhysObject : PhysicsActor
253 SubscribedEventsMs = 0; 254 SubscribedEventsMs = 0;
254 PhysicsScene.TaintedObject(TypeName+".UnSubscribeEvents", delegate() 255 PhysicsScene.TaintedObject(TypeName+".UnSubscribeEvents", delegate()
255 { 256 {
256 CurrentCollisionFlags = BulletSimAPI.RemoveFromCollisionFlags2(PhysBody.ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS); 257 // Make sure there is a body there because sometimes destruction happens in an un-ideal order.
258 if (PhysBody.HasPhysicalBody)
259 CurrentCollisionFlags = BulletSimAPI.RemoveFromCollisionFlags2(PhysBody.ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS);
257 }); 260 });
258 } 261 }
259 // Return 'true' if the simulator wants collision events 262 // Return 'true' if the simulator wants collision events