aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorRobert Adams2012-08-14 16:22:21 -0700
committerRobert Adams2012-08-15 12:07:53 -0700
commit6f1f299619d0ca60e06dc03d499259efcd4eeb80 (patch)
tree6b3b77366ceedb0caaa5896e727c8589f31326d4 /OpenSim
parentBulletSim: rework physics FPS calculation to make a more realistic number. (diff)
downloadopensim-SC-6f1f299619d0ca60e06dc03d499259efcd4eeb80.zip
opensim-SC-6f1f299619d0ca60e06dc03d499259efcd4eeb80.tar.gz
opensim-SC-6f1f299619d0ca60e06dc03d499259efcd4eeb80.tar.bz2
opensim-SC-6f1f299619d0ca60e06dc03d499259efcd4eeb80.tar.xz
BulletSim: Add the class BSCharacter to the DetailLog output
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs16
1 files changed, 10 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index f164afe..d288ab7 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -137,7 +137,7 @@ public class BSCharacter : PhysicsActor
137 // called when this character is being destroyed and the resources should be released 137 // called when this character is being destroyed and the resources should be released
138 public void Destroy() 138 public void Destroy()
139 { 139 {
140 // DetailLog("{0},Destroy", LocalID); 140 // DetailLog("{0},BSCharacter.Destroy", LocalID);
141 _scene.TaintedObject("BSCharacter.destroy", delegate() 141 _scene.TaintedObject("BSCharacter.destroy", delegate()
142 { 142 {
143 BulletSimAPI.DestroyObject(_scene.WorldID, _localID); 143 BulletSimAPI.DestroyObject(_scene.WorldID, _localID);
@@ -209,7 +209,7 @@ public class BSCharacter : PhysicsActor
209 209
210 _scene.TaintedObject("BSCharacter.setPosition", delegate() 210 _scene.TaintedObject("BSCharacter.setPosition", delegate()
211 { 211 {
212 DetailLog("{0},SetPosition,taint,pos={1},orient={2}", LocalID, _position, _orientation); 212 DetailLog("{0},BSCharacter.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);
214 }); 214 });
215 } 215 }
@@ -226,7 +226,7 @@ public class BSCharacter : PhysicsActor
226 float terrainHeight = Scene.GetTerrainHeightAtXYZ(_position); 226 float terrainHeight = Scene.GetTerrainHeightAtXYZ(_position);
227 if (_position.Z < terrainHeight) 227 if (_position.Z < terrainHeight)
228 { 228 {
229 DetailLog("{0},PositionAdjustUnderGround,call,pos={1},orient={2}", LocalID, _position, _orientation); 229 DetailLog("{0},BSCharacter.PositionAdjustUnderGround,call,pos={1},orient={2}", LocalID, _position, _orientation);
230 _position.Z = terrainHeight + 2.0f; 230 _position.Z = terrainHeight + 2.0f;
231 ret = true; 231 ret = true;
232 } 232 }
@@ -368,7 +368,7 @@ public class BSCharacter : PhysicsActor
368 set { _buoyancy = value; 368 set { _buoyancy = value;
369 _scene.TaintedObject("BSCharacter.setBuoyancy", delegate() 369 _scene.TaintedObject("BSCharacter.setBuoyancy", delegate()
370 { 370 {
371 DetailLog("{0},setBuoyancy,taint,buoy={1}", LocalID, _buoyancy); 371 DetailLog("{0},BSCharacter.setBuoyancy,taint,buoy={1}", LocalID, _buoyancy);
372 BulletSimAPI.SetObjectBuoyancy(_scene.WorldID, LocalID, _buoyancy); 372 BulletSimAPI.SetObjectBuoyancy(_scene.WorldID, LocalID, _buoyancy);
373 }); 373 });
374 } 374 }
@@ -415,7 +415,7 @@ public class BSCharacter : PhysicsActor
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("BSCharacter.AddForce", delegate() 416 _scene.TaintedObject("BSCharacter.AddForce", delegate()
417 { 417 {
418 DetailLog("{0},setAddForce,taint,addedForce={1}", LocalID, _force); 418 DetailLog("{0},BSCharacter.setAddForce,taint,addedForce={1}", LocalID, _force);
419 BulletSimAPI.AddObjectForce2(Body.Ptr, _force); 419 BulletSimAPI.AddObjectForce2(Body.Ptr, _force);
420 }); 420 });
421 } 421 }
@@ -507,6 +507,7 @@ public class BSCharacter : PhysicsActor
507 { 507 {
508 _collidingGroundStep = _scene.SimulationStep; 508 _collidingGroundStep = _scene.SimulationStep;
509 } 509 }
510 // DetailLog("{0},BSCharacter.Collison,call,with={1}", LocalID, collidingWith);
510 511
511 // throttle collisions to the rate specified in the subscription 512 // throttle collisions to the rate specified in the subscription
512 if (_subscribedEventsMs != 0) { 513 if (_subscribedEventsMs != 0) {
@@ -535,7 +536,10 @@ public class BSCharacter : PhysicsActor
535 if (collisionCollection == null) 536 if (collisionCollection == null)
536 collisionCollection = new CollisionEventUpdate(); 537 collisionCollection = new CollisionEventUpdate();
537 base.SendCollisionUpdate(collisionCollection); 538 base.SendCollisionUpdate(collisionCollection);
538 collisionCollection.Clear(); 539 // If there were any collisions in the collection, make sure we don't use the
540 // same instance next time.
541 if (collisionCollection.Count > 0)
542 collisionCollection = null;
539 // End kludge 543 // End kludge
540 } 544 }
541 545