aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
diff options
context:
space:
mode:
authorMelanie2012-08-15 22:59:31 +0100
committerMelanie2012-08-15 22:59:31 +0100
commite286a95d761334bb5781638d3bb16338a8343c71 (patch)
tree6d854f59efb4b4922654d03329c07eb7476e1cce /OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
parentImplementing PRIM_LINK_TARGET in a non-recursive fashion (diff)
parentDon't enable the thread watchdog until all regions are ready. (diff)
downloadopensim-SC_OLD-e286a95d761334bb5781638d3bb16338a8343c71.zip
opensim-SC_OLD-e286a95d761334bb5781638d3bb16338a8343c71.tar.gz
opensim-SC_OLD-e286a95d761334bb5781638d3bb16338a8343c71.tar.bz2
opensim-SC_OLD-e286a95d761334bb5781638d3bb16338a8343c71.tar.xz
Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs18
1 files changed, 12 insertions, 6 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index f164afe..e2f7af9 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 }
@@ -488,9 +488,11 @@ public class BSCharacter : PhysicsActor
488 // Avatars don't report their changes the usual way. Changes are checked for in the heartbeat loop. 488 // Avatars don't report their changes the usual way. Changes are checked for in the heartbeat loop.
489 // base.RequestPhysicsterseUpdate(); 489 // base.RequestPhysicsterseUpdate();
490 490
491 /*
491 DetailLog("{0},BSCharacter.UpdateProperties,call,pos={1},orient={2},vel={3},accel={4},rotVel={5}", 492 DetailLog("{0},BSCharacter.UpdateProperties,call,pos={1},orient={2},vel={3},accel={4},rotVel={5}",
492 LocalID, entprop.Position, entprop.Rotation, entprop.Velocity, 493 LocalID, entprop.Position, entprop.Rotation, entprop.Velocity,
493 entprop.Acceleration, entprop.RotationalVelocity); 494 entprop.Acceleration, entprop.RotationalVelocity);
495 */
494 } 496 }
495 497
496 // Called by the scene when a collision with this object is reported 498 // Called by the scene when a collision with this object is reported
@@ -507,6 +509,7 @@ public class BSCharacter : PhysicsActor
507 { 509 {
508 _collidingGroundStep = _scene.SimulationStep; 510 _collidingGroundStep = _scene.SimulationStep;
509 } 511 }
512 // DetailLog("{0},BSCharacter.Collison,call,with={1}", LocalID, collidingWith);
510 513
511 // throttle collisions to the rate specified in the subscription 514 // throttle collisions to the rate specified in the subscription
512 if (_subscribedEventsMs != 0) { 515 if (_subscribedEventsMs != 0) {
@@ -535,7 +538,10 @@ public class BSCharacter : PhysicsActor
535 if (collisionCollection == null) 538 if (collisionCollection == null)
536 collisionCollection = new CollisionEventUpdate(); 539 collisionCollection = new CollisionEventUpdate();
537 base.SendCollisionUpdate(collisionCollection); 540 base.SendCollisionUpdate(collisionCollection);
538 collisionCollection.Clear(); 541 // If there were any collisions in the collection, make sure we don't use the
542 // same instance next time.
543 if (collisionCollection.Count > 0)
544 collisionCollection = null;
539 // End kludge 545 // End kludge
540 } 546 }
541 547