aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
diff options
context:
space:
mode:
authorRobert Adams2012-08-09 15:17:19 -0700
committerRobert Adams2012-08-09 15:17:19 -0700
commit320982cae388814b8e7e9e9fe62724caa9621d90 (patch)
treeef2d7bd50cfb5276b7573022867d812446a2e54e /OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
parentBulletSim: separate out the constraints by type. The linksets use (diff)
downloadopensim-SC-320982cae388814b8e7e9e9fe62724caa9621d90.zip
opensim-SC-320982cae388814b8e7e9e9fe62724caa9621d90.tar.gz
opensim-SC-320982cae388814b8e7e9e9fe62724caa9621d90.tar.bz2
opensim-SC-320982cae388814b8e7e9e9fe62724caa9621d90.tar.xz
BulletSim: add an identifier to the TaintObject call so exceptions that happen when the taint is invoked can be debugged
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs22
1 files changed, 11 insertions, 11 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index 8149a53..d49a578 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -122,7 +122,7 @@ public class BSCharacter : PhysicsActor
122 shapeData.Restitution = _scene.Params.avatarRestitution; 122 shapeData.Restitution = _scene.Params.avatarRestitution;
123 123
124 // do actual create at taint time 124 // do actual create at taint time
125 _scene.TaintedObject(delegate() 125 _scene.TaintedObject("BSCharacter.create", delegate()
126 { 126 {
127 BulletSimAPI.CreateObject(parent_scene.WorldID, shapeData); 127 BulletSimAPI.CreateObject(parent_scene.WorldID, shapeData);
128 128
@@ -138,7 +138,7 @@ public class BSCharacter : PhysicsActor
138 public void Destroy() 138 public void Destroy()
139 { 139 {
140 // DetailLog("{0},Destroy", LocalID); 140 // DetailLog("{0},Destroy", LocalID);
141 _scene.TaintedObject(delegate() 141 _scene.TaintedObject("BSCharacter.destroy", delegate()
142 { 142 {
143 BulletSimAPI.DestroyObject(_scene.WorldID, _localID); 143 BulletSimAPI.DestroyObject(_scene.WorldID, _localID);
144 }); 144 });
@@ -169,7 +169,7 @@ public class BSCharacter : PhysicsActor
169 169
170 ComputeAvatarVolumeAndMass(); 170 ComputeAvatarVolumeAndMass();
171 171
172 _scene.TaintedObject(delegate() 172 _scene.TaintedObject("BSCharacter.setSize", delegate()
173 { 173 {
174 BulletSimAPI.SetObjectScaleMass(_scene.WorldID, LocalID, _scale, _mass, true); 174 BulletSimAPI.SetObjectScaleMass(_scene.WorldID, LocalID, _scale, _mass, true);
175 }); 175 });
@@ -207,7 +207,7 @@ public class BSCharacter : PhysicsActor
207 _position = value; 207 _position = value;
208 PositionSanityCheck(); 208 PositionSanityCheck();
209 209
210 _scene.TaintedObject(delegate() 210 _scene.TaintedObject("BSCharacter.setPosition", delegate()
211 { 211 {
212 DetailLog("{0},SetPosition,taint,pos={1},orient={2}", LocalID, _position, _orientation); 212 DetailLog("{0},SetPosition,taint,pos={1},orient={2}", LocalID, _position, _orientation);
213 BulletSimAPI.SetObjectTranslation(_scene.WorldID, _localID, _position, _orientation); 213 BulletSimAPI.SetObjectTranslation(_scene.WorldID, _localID, _position, _orientation);
@@ -246,7 +246,7 @@ public class BSCharacter : PhysicsActor
246 set { 246 set {
247 _force = value; 247 _force = value;
248 // m_log.DebugFormat("{0}: Force = {1}", LogHeader, _force); 248 // m_log.DebugFormat("{0}: Force = {1}", LogHeader, _force);
249 Scene.TaintedObject(delegate() 249 Scene.TaintedObject("BSCharacter.SetForce", delegate()
250 { 250 {
251 DetailLog("{0},setForce,taint,force={1}", LocalID, _force); 251 DetailLog("{0},setForce,taint,force={1}", LocalID, _force);
252 BulletSimAPI.SetObjectForce(Scene.WorldID, LocalID, _force); 252 BulletSimAPI.SetObjectForce(Scene.WorldID, LocalID, _force);
@@ -273,7 +273,7 @@ public class BSCharacter : PhysicsActor
273 set { 273 set {
274 _velocity = value; 274 _velocity = value;
275 // m_log.DebugFormat("{0}: set velocity = {1}", LogHeader, _velocity); 275 // m_log.DebugFormat("{0}: set velocity = {1}", LogHeader, _velocity);
276 _scene.TaintedObject(delegate() 276 _scene.TaintedObject("BSCharacter.setVelocity", delegate()
277 { 277 {
278 DetailLog("{0},setVelocity,taint,vel={1}", LocalID, _velocity); 278 DetailLog("{0},setVelocity,taint,vel={1}", LocalID, _velocity);
279 BulletSimAPI.SetObjectVelocity(_scene.WorldID, _localID, _velocity); 279 BulletSimAPI.SetObjectVelocity(_scene.WorldID, _localID, _velocity);
@@ -299,7 +299,7 @@ public class BSCharacter : PhysicsActor
299 set { 299 set {
300 _orientation = value; 300 _orientation = value;
301 // m_log.DebugFormat("{0}: set orientation to {1}", LogHeader, _orientation); 301 // m_log.DebugFormat("{0}: set orientation to {1}", LogHeader, _orientation);
302 _scene.TaintedObject(delegate() 302 _scene.TaintedObject("BSCharacter.setOrientation", delegate()
303 { 303 {
304 // _position = BulletSimAPI.GetObjectPosition(_scene.WorldID, _localID); 304 // _position = BulletSimAPI.GetObjectPosition(_scene.WorldID, _localID);
305 BulletSimAPI.SetObjectTranslation(_scene.WorldID, _localID, _position, _orientation); 305 BulletSimAPI.SetObjectTranslation(_scene.WorldID, _localID, _position, _orientation);
@@ -366,7 +366,7 @@ public class BSCharacter : PhysicsActor
366 public override float Buoyancy { 366 public override float Buoyancy {
367 get { return _buoyancy; } 367 get { return _buoyancy; }
368 set { _buoyancy = value; 368 set { _buoyancy = value;
369 _scene.TaintedObject(delegate() 369 _scene.TaintedObject("BSCharacter.setBuoyancy", delegate()
370 { 370 {
371 DetailLog("{0},setBuoyancy,taint,buoy={1}", LocalID, _buoyancy); 371 DetailLog("{0},setBuoyancy,taint,buoy={1}", LocalID, _buoyancy);
372 BulletSimAPI.SetObjectBuoyancy(_scene.WorldID, LocalID, _buoyancy); 372 BulletSimAPI.SetObjectBuoyancy(_scene.WorldID, LocalID, _buoyancy);
@@ -413,7 +413,7 @@ public class BSCharacter : PhysicsActor
413 _force.Y += force.Y; 413 _force.Y += force.Y;
414 _force.Z += force.Z; 414 _force.Z += force.Z;
415 // m_log.DebugFormat("{0}: AddForce. adding={1}, newForce={2}", LogHeader, force, _force); 415 // m_log.DebugFormat("{0}: AddForce. adding={1}, newForce={2}", LogHeader, force, _force);
416 _scene.TaintedObject(delegate() 416 _scene.TaintedObject("BSCharacter.AddForce", delegate()
417 { 417 {
418 DetailLog("{0},setAddForce,taint,addedForce={1}", LocalID, _force); 418 DetailLog("{0},setAddForce,taint,addedForce={1}", LocalID, _force);
419 BulletSimAPI.AddObjectForce2(Body.Ptr, _force); 419 BulletSimAPI.AddObjectForce2(Body.Ptr, _force);
@@ -439,7 +439,7 @@ public class BSCharacter : PhysicsActor
439 // make sure first collision happens 439 // make sure first collision happens
440 _nextCollisionOkTime = Util.EnvironmentTickCount() - _subscribedEventsMs; 440 _nextCollisionOkTime = Util.EnvironmentTickCount() - _subscribedEventsMs;
441 441
442 Scene.TaintedObject(delegate() 442 Scene.TaintedObject("BSCharacter.SubscribeEvents", delegate()
443 { 443 {
444 BulletSimAPI.AddToCollisionFlags2(Body.Ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS); 444 BulletSimAPI.AddToCollisionFlags2(Body.Ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS);
445 }); 445 });
@@ -449,7 +449,7 @@ public class BSCharacter : PhysicsActor
449 public override void UnSubscribeEvents() { 449 public override void UnSubscribeEvents() {
450 _subscribedEventsMs = 0; 450 _subscribedEventsMs = 0;
451 // Avatars get all their collision events 451 // Avatars get all their collision events
452 // Scene.TaintedObject(delegate() 452 // Scene.TaintedObject("BSCharacter.UnSubscribeEvents", delegate()
453 // { 453 // {
454 // BulletSimAPI.RemoveFromCollisionFlags2(Body.Ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS); 454 // BulletSimAPI.RemoveFromCollisionFlags2(Body.Ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS);
455 // }); 455 // });