diff options
author | Robert Adams | 2013-02-21 08:52:11 -0800 |
---|---|---|
committer | Robert Adams | 2013-02-21 08:52:11 -0800 |
commit | efb5da0aa672551a8a68e16066f3dd3991f75da4 (patch) | |
tree | 713c0f254a512f18e3025afc0b8d0621bade92c7 /OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | |
parent | Add a method to IStatsCollector for returning stats as an OSDMap. (diff) | |
download | opensim-SC_OLD-efb5da0aa672551a8a68e16066f3dd3991f75da4.zip opensim-SC_OLD-efb5da0aa672551a8a68e16066f3dd3991f75da4.tar.gz opensim-SC_OLD-efb5da0aa672551a8a68e16066f3dd3991f75da4.tar.bz2 opensim-SC_OLD-efb5da0aa672551a8a68e16066f3dd3991f75da4.tar.xz |
BulletSim: add OutOfBounds logic and some position sanity checking
to eliminate some of the "cannot find terrain height" warning messages.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index 8dca7c6..1f186c3 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | |||
@@ -443,6 +443,7 @@ public sealed class BSCharacter : BSPhysObject | |||
443 | PhysicsScene.TaintedObject("BSCharacter.setPosition", delegate() | 443 | PhysicsScene.TaintedObject("BSCharacter.setPosition", delegate() |
444 | { | 444 | { |
445 | DetailLog("{0},BSCharacter.SetPosition,taint,pos={1},orient={2}", LocalID, _position, _orientation); | 445 | DetailLog("{0},BSCharacter.SetPosition,taint,pos={1},orient={2}", LocalID, _position, _orientation); |
446 | PositionSanityCheck(); | ||
446 | ForcePosition = _position; | 447 | ForcePosition = _position; |
447 | }); | 448 | }); |
448 | } | 449 | } |
@@ -456,7 +457,6 @@ public sealed class BSCharacter : BSPhysObject | |||
456 | _position = value; | 457 | _position = value; |
457 | if (PhysBody.HasPhysicalBody) | 458 | if (PhysBody.HasPhysicalBody) |
458 | { | 459 | { |
459 | PositionSanityCheck(); | ||
460 | PhysicsScene.PE.SetTranslation(PhysBody, _position, _orientation); | 460 | PhysicsScene.PE.SetTranslation(PhysBody, _position, _orientation); |
461 | } | 461 | } |
462 | } | 462 | } |
@@ -512,9 +512,8 @@ public sealed class BSCharacter : BSPhysObject | |||
512 | // just assign to "Position" because of potential call loops. | 512 | // just assign to "Position" because of potential call loops. |
513 | PhysicsScene.TaintedObject(inTaintTime, "BSCharacter.PositionSanityCheck", delegate() | 513 | PhysicsScene.TaintedObject(inTaintTime, "BSCharacter.PositionSanityCheck", delegate() |
514 | { | 514 | { |
515 | DetailLog("{0},BSCharacter.PositionSanityCheck,taint,pos={1},orient={2}", LocalID, _position, _orientation); | 515 | DetailLog("{0},BSCharacter.PositionSanityCheck,taint,pos={1},orient={2}", LocalID, _position, _orientation); |
516 | if (PhysBody.HasPhysicalBody) | 516 | ForcePosition = _position; |
517 | PhysicsScene.PE.SetTranslation(PhysBody, _position, _orientation); | ||
518 | }); | 517 | }); |
519 | ret = true; | 518 | ret = true; |
520 | } | 519 | } |