aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
diff options
context:
space:
mode:
authorRobert Adams2012-09-27 08:23:29 -0700
committerRobert Adams2012-09-27 22:01:52 -0700
commitf82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b (patch)
tree3d355254a7bcb8c447fbfef901784af7062763d4 /OpenSim/Region/Physics/BulletSPlugin/BSPhysObject.cs
parentBulletSim: Terrain sets proper collision flags on creation. (diff)
downloadopensim-SC_OLD-f82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b.zip
opensim-SC_OLD-f82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b.tar.gz
opensim-SC_OLD-f82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b.tar.bz2
opensim-SC_OLD-f82b903deeaaf8eaa7ae5c4d4b7e917dd0a6ce7b.tar.xz
BulletSim: Fix linkset crash. Caused by the different body and shape
pointers at runtime and at taint-time. Now passes the body into the taint. Vehicles zero inertia when active to eliminate Bullet's contribution to vehicle motion.
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.