aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs10
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
index 1f186c3..f442ca2 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs
@@ -204,7 +204,7 @@ public sealed class BSCharacter : BSPhysObject
204 // move. Thus, the velocity cannot be forced to zero. The problem is that small velocity 204 // move. Thus, the velocity cannot be forced to zero. The problem is that small velocity
205 // errors can creap in and the avatar will slowly float off in some direction. 205 // errors can creap in and the avatar will slowly float off in some direction.
206 // So, the problem is that, when an avatar is standing, we cannot tell creaping error 206 // So, the problem is that, when an avatar is standing, we cannot tell creaping error
207 // from real pushing.OMV.Vector3.Zero; 207 // from real pushing.
208 // The code below keeps setting the velocity to zero hoping the world will keep pushing. 208 // The code below keeps setting the velocity to zero hoping the world will keep pushing.
209 209
210 _velocityMotor.Step(timeStep); 210 _velocityMotor.Step(timeStep);
@@ -254,9 +254,11 @@ public sealed class BSCharacter : BSPhysObject
254 } 254 }
255 255
256 // If falling, we keep the world's downward vector no matter what the other axis specify. 256 // If falling, we keep the world's downward vector no matter what the other axis specify.
257 // The check for _velocity.Z < 0 makes jumping work (temporary upward force).
257 if (!Flying && !IsColliding) 258 if (!Flying && !IsColliding)
258 { 259 {
259 stepVelocity.Z = _velocity.Z; 260 if (_velocity.Z < 0)
261 stepVelocity.Z = _velocity.Z;
260 // DetailLog("{0},BSCharacter.MoveMotor,taint,overrideStepZWithWorldZ,stepVel={1}", LocalID, stepVelocity); 262 // DetailLog("{0},BSCharacter.MoveMotor,taint,overrideStepZWithWorldZ,stepVel={1}", LocalID, stepVelocity);
261 } 263 }
262 264
@@ -512,7 +514,7 @@ public sealed class BSCharacter : BSPhysObject
512 // just assign to "Position" because of potential call loops. 514 // just assign to "Position" because of potential call loops.
513 PhysicsScene.TaintedObject(inTaintTime, "BSCharacter.PositionSanityCheck", delegate() 515 PhysicsScene.TaintedObject(inTaintTime, "BSCharacter.PositionSanityCheck", delegate()
514 { 516 {
515 DetailLog("{0},BSCharacter.PositionSanityCheck,taint,pos={1},orient={2}", LocalID, _position, _orientation); 517 DetailLog("{0},BSCharacter.PositionSanityCheck,taint,pos={1},orient={2}", LocalID, _position, _orientation);
516 ForcePosition = _position; 518 ForcePosition = _position;
517 }); 519 });
518 ret = true; 520 ret = true;
@@ -572,7 +574,7 @@ public sealed class BSCharacter : BSPhysObject
572 m_targetVelocity = value; 574 m_targetVelocity = value;
573 OMV.Vector3 targetVel = value; 575 OMV.Vector3 targetVel = value;
574 if (_setAlwaysRun) 576 if (_setAlwaysRun)
575 targetVel *= BSParam.AvatarAlwaysRunFactor; 577 targetVel *= new OMV.Vector3(BSParam.AvatarAlwaysRunFactor, BSParam.AvatarAlwaysRunFactor, 0f);
576 578
577 PhysicsScene.TaintedObject("BSCharacter.setTargetVelocity", delegate() 579 PhysicsScene.TaintedObject("BSCharacter.setTargetVelocity", delegate()
578 { 580 {