From 320982cae388814b8e7e9e9fe62724caa9621d90 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Thu, 9 Aug 2012 15:17:19 -0700 Subject: BulletSim: add an identifier to the TaintObject call so exceptions that happen when the taint is invoked can be debugged --- .../Region/Physics/BulletSPlugin/BSCharacter.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs') 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 shapeData.Restitution = _scene.Params.avatarRestitution; // do actual create at taint time - _scene.TaintedObject(delegate() + _scene.TaintedObject("BSCharacter.create", delegate() { BulletSimAPI.CreateObject(parent_scene.WorldID, shapeData); @@ -138,7 +138,7 @@ public class BSCharacter : PhysicsActor public void Destroy() { // DetailLog("{0},Destroy", LocalID); - _scene.TaintedObject(delegate() + _scene.TaintedObject("BSCharacter.destroy", delegate() { BulletSimAPI.DestroyObject(_scene.WorldID, _localID); }); @@ -169,7 +169,7 @@ public class BSCharacter : PhysicsActor ComputeAvatarVolumeAndMass(); - _scene.TaintedObject(delegate() + _scene.TaintedObject("BSCharacter.setSize", delegate() { BulletSimAPI.SetObjectScaleMass(_scene.WorldID, LocalID, _scale, _mass, true); }); @@ -207,7 +207,7 @@ public class BSCharacter : PhysicsActor _position = value; PositionSanityCheck(); - _scene.TaintedObject(delegate() + _scene.TaintedObject("BSCharacter.setPosition", delegate() { DetailLog("{0},SetPosition,taint,pos={1},orient={2}", LocalID, _position, _orientation); BulletSimAPI.SetObjectTranslation(_scene.WorldID, _localID, _position, _orientation); @@ -246,7 +246,7 @@ public class BSCharacter : PhysicsActor set { _force = value; // m_log.DebugFormat("{0}: Force = {1}", LogHeader, _force); - Scene.TaintedObject(delegate() + Scene.TaintedObject("BSCharacter.SetForce", delegate() { DetailLog("{0},setForce,taint,force={1}", LocalID, _force); BulletSimAPI.SetObjectForce(Scene.WorldID, LocalID, _force); @@ -273,7 +273,7 @@ public class BSCharacter : PhysicsActor set { _velocity = value; // m_log.DebugFormat("{0}: set velocity = {1}", LogHeader, _velocity); - _scene.TaintedObject(delegate() + _scene.TaintedObject("BSCharacter.setVelocity", delegate() { DetailLog("{0},setVelocity,taint,vel={1}", LocalID, _velocity); BulletSimAPI.SetObjectVelocity(_scene.WorldID, _localID, _velocity); @@ -299,7 +299,7 @@ public class BSCharacter : PhysicsActor set { _orientation = value; // m_log.DebugFormat("{0}: set orientation to {1}", LogHeader, _orientation); - _scene.TaintedObject(delegate() + _scene.TaintedObject("BSCharacter.setOrientation", delegate() { // _position = BulletSimAPI.GetObjectPosition(_scene.WorldID, _localID); BulletSimAPI.SetObjectTranslation(_scene.WorldID, _localID, _position, _orientation); @@ -366,7 +366,7 @@ public class BSCharacter : PhysicsActor public override float Buoyancy { get { return _buoyancy; } set { _buoyancy = value; - _scene.TaintedObject(delegate() + _scene.TaintedObject("BSCharacter.setBuoyancy", delegate() { DetailLog("{0},setBuoyancy,taint,buoy={1}", LocalID, _buoyancy); BulletSimAPI.SetObjectBuoyancy(_scene.WorldID, LocalID, _buoyancy); @@ -413,7 +413,7 @@ public class BSCharacter : PhysicsActor _force.Y += force.Y; _force.Z += force.Z; // m_log.DebugFormat("{0}: AddForce. adding={1}, newForce={2}", LogHeader, force, _force); - _scene.TaintedObject(delegate() + _scene.TaintedObject("BSCharacter.AddForce", delegate() { DetailLog("{0},setAddForce,taint,addedForce={1}", LocalID, _force); BulletSimAPI.AddObjectForce2(Body.Ptr, _force); @@ -439,7 +439,7 @@ public class BSCharacter : PhysicsActor // make sure first collision happens _nextCollisionOkTime = Util.EnvironmentTickCount() - _subscribedEventsMs; - Scene.TaintedObject(delegate() + Scene.TaintedObject("BSCharacter.SubscribeEvents", delegate() { BulletSimAPI.AddToCollisionFlags2(Body.Ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS); }); @@ -449,7 +449,7 @@ public class BSCharacter : PhysicsActor public override void UnSubscribeEvents() { _subscribedEventsMs = 0; // Avatars get all their collision events - // Scene.TaintedObject(delegate() + // Scene.TaintedObject("BSCharacter.UnSubscribeEvents", delegate() // { // BulletSimAPI.RemoveFromCollisionFlags2(Body.Ptr, CollisionFlags.BS_SUBSCRIBE_COLLISION_EVENTS); // }); -- cgit v1.1