BulletSim: Add the class BSCharacter to the DetailLog output
parent
11a4b9ec1d
commit
6f1f299619
|
@ -137,7 +137,7 @@ public class BSCharacter : PhysicsActor
|
||||||
// called when this character is being destroyed and the resources should be released
|
// called when this character is being destroyed and the resources should be released
|
||||||
public void Destroy()
|
public void Destroy()
|
||||||
{
|
{
|
||||||
// DetailLog("{0},Destroy", LocalID);
|
// DetailLog("{0},BSCharacter.Destroy", LocalID);
|
||||||
_scene.TaintedObject("BSCharacter.destroy", delegate()
|
_scene.TaintedObject("BSCharacter.destroy", delegate()
|
||||||
{
|
{
|
||||||
BulletSimAPI.DestroyObject(_scene.WorldID, _localID);
|
BulletSimAPI.DestroyObject(_scene.WorldID, _localID);
|
||||||
|
@ -209,7 +209,7 @@ public class BSCharacter : PhysicsActor
|
||||||
|
|
||||||
_scene.TaintedObject("BSCharacter.setPosition", delegate()
|
_scene.TaintedObject("BSCharacter.setPosition", delegate()
|
||||||
{
|
{
|
||||||
DetailLog("{0},SetPosition,taint,pos={1},orient={2}", LocalID, _position, _orientation);
|
DetailLog("{0},BSCharacter.SetPosition,taint,pos={1},orient={2}", LocalID, _position, _orientation);
|
||||||
BulletSimAPI.SetObjectTranslation(_scene.WorldID, _localID, _position, _orientation);
|
BulletSimAPI.SetObjectTranslation(_scene.WorldID, _localID, _position, _orientation);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -226,7 +226,7 @@ public class BSCharacter : PhysicsActor
|
||||||
float terrainHeight = Scene.GetTerrainHeightAtXYZ(_position);
|
float terrainHeight = Scene.GetTerrainHeightAtXYZ(_position);
|
||||||
if (_position.Z < terrainHeight)
|
if (_position.Z < terrainHeight)
|
||||||
{
|
{
|
||||||
DetailLog("{0},PositionAdjustUnderGround,call,pos={1},orient={2}", LocalID, _position, _orientation);
|
DetailLog("{0},BSCharacter.PositionAdjustUnderGround,call,pos={1},orient={2}", LocalID, _position, _orientation);
|
||||||
_position.Z = terrainHeight + 2.0f;
|
_position.Z = terrainHeight + 2.0f;
|
||||||
ret = true;
|
ret = true;
|
||||||
}
|
}
|
||||||
|
@ -368,7 +368,7 @@ public class BSCharacter : PhysicsActor
|
||||||
set { _buoyancy = value;
|
set { _buoyancy = value;
|
||||||
_scene.TaintedObject("BSCharacter.setBuoyancy", delegate()
|
_scene.TaintedObject("BSCharacter.setBuoyancy", delegate()
|
||||||
{
|
{
|
||||||
DetailLog("{0},setBuoyancy,taint,buoy={1}", LocalID, _buoyancy);
|
DetailLog("{0},BSCharacter.setBuoyancy,taint,buoy={1}", LocalID, _buoyancy);
|
||||||
BulletSimAPI.SetObjectBuoyancy(_scene.WorldID, LocalID, _buoyancy);
|
BulletSimAPI.SetObjectBuoyancy(_scene.WorldID, LocalID, _buoyancy);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -415,7 +415,7 @@ public class BSCharacter : PhysicsActor
|
||||||
// m_log.DebugFormat("{0}: AddForce. adding={1}, newForce={2}", LogHeader, force, _force);
|
// m_log.DebugFormat("{0}: AddForce. adding={1}, newForce={2}", LogHeader, force, _force);
|
||||||
_scene.TaintedObject("BSCharacter.AddForce", delegate()
|
_scene.TaintedObject("BSCharacter.AddForce", delegate()
|
||||||
{
|
{
|
||||||
DetailLog("{0},setAddForce,taint,addedForce={1}", LocalID, _force);
|
DetailLog("{0},BSCharacter.setAddForce,taint,addedForce={1}", LocalID, _force);
|
||||||
BulletSimAPI.AddObjectForce2(Body.Ptr, _force);
|
BulletSimAPI.AddObjectForce2(Body.Ptr, _force);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -507,6 +507,7 @@ public class BSCharacter : PhysicsActor
|
||||||
{
|
{
|
||||||
_collidingGroundStep = _scene.SimulationStep;
|
_collidingGroundStep = _scene.SimulationStep;
|
||||||
}
|
}
|
||||||
|
// DetailLog("{0},BSCharacter.Collison,call,with={1}", LocalID, collidingWith);
|
||||||
|
|
||||||
// throttle collisions to the rate specified in the subscription
|
// throttle collisions to the rate specified in the subscription
|
||||||
if (_subscribedEventsMs != 0) {
|
if (_subscribedEventsMs != 0) {
|
||||||
|
@ -535,7 +536,10 @@ public class BSCharacter : PhysicsActor
|
||||||
if (collisionCollection == null)
|
if (collisionCollection == null)
|
||||||
collisionCollection = new CollisionEventUpdate();
|
collisionCollection = new CollisionEventUpdate();
|
||||||
base.SendCollisionUpdate(collisionCollection);
|
base.SendCollisionUpdate(collisionCollection);
|
||||||
collisionCollection.Clear();
|
// If there were any collisions in the collection, make sure we don't use the
|
||||||
|
// same instance next time.
|
||||||
|
if (collisionCollection.Count > 0)
|
||||||
|
collisionCollection = null;
|
||||||
// End kludge
|
// End kludge
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue