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.cs9
1 files changed, 7 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
index 73b5764..e7cb3e0 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
@@ -67,6 +67,11 @@ public abstract class BSPhysObject : PhysicsActor
67 PhysObjectName = name; 67 PhysObjectName = name;
68 TypeName = typeName; 68 TypeName = typeName;
69 69
70 // We don't have any physical representation yet.
71 PhysBody = new BulletBody(localID);
72 PhysShape = new BulletShape();
73
74 // A linkset of just me
70 Linkset = BSLinkset.Factory(PhysicsScene, this); 75 Linkset = BSLinkset.Factory(PhysicsScene, this);
71 LastAssetBuildFailed = false; 76 LastAssetBuildFailed = false;
72 77
@@ -303,7 +308,7 @@ public abstract class BSPhysObject : PhysicsActor
303 PhysicsScene.TaintedObject(TypeName+".SubscribeEvents", delegate() 308 PhysicsScene.TaintedObject(TypeName+".SubscribeEvents", delegate()
304 { 309 {
305 if (PhysBody.HasPhysicalBody) 310 if (PhysBody.HasPhysicalBody)
306 CurrentCollisionFlags = BulletSimAPI.AddToCollisionFlags2(PhysBody.ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS); 311 CurrentCollisionFlags = PhysicsScene.PE.AddToCollisionFlags(PhysBody, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS);
307 }); 312 });
308 } 313 }
309 else 314 else
@@ -319,7 +324,7 @@ public abstract class BSPhysObject : PhysicsActor
319 { 324 {
320 // Make sure there is a body there because sometimes destruction happens in an un-ideal order. 325 // Make sure there is a body there because sometimes destruction happens in an un-ideal order.
321 if (PhysBody.HasPhysicalBody) 326 if (PhysBody.HasPhysicalBody)
322 CurrentCollisionFlags = BulletSimAPI.RemoveFromCollisionFlags2(PhysBody.ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS); 327 CurrentCollisionFlags = PhysicsScene.PE.RemoveFromCollisionFlags(PhysBody, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS);
323 }); 328 });
324 } 329 }
325 // Return 'true' if the simulator wants collision events 330 // Return 'true' if the simulator wants collision events