diff options
author | Robert Adams | 2012-12-28 12:01:57 -0800 |
---|---|---|
committer | Robert Adams | 2012-12-28 12:01:57 -0800 |
commit | 7266eeca6efd10852a062cfc802a50c346b7b119 (patch) | |
tree | 4a83775444b657a692aeef82b701eb5fce6ec9bc /OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | |
parent | BulletSim: fix problem of avatars appearing to walk through walls (diff) | |
download | opensim-SC-7266eeca6efd10852a062cfc802a50c346b7b119.zip opensim-SC-7266eeca6efd10852a062cfc802a50c346b7b119.tar.gz opensim-SC-7266eeca6efd10852a062cfc802a50c346b7b119.tar.bz2 opensim-SC-7266eeca6efd10852a062cfc802a50c346b7b119.tar.xz |
BulletSim: add 'AvatarAlwaysRunFactor' parameter and use in setTargetVelocity
to implement the 'always run' feature.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index 90936d0..901f976 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | |||
@@ -464,15 +464,15 @@ public sealed class BSCharacter : BSPhysObject | |||
464 | { | 464 | { |
465 | DetailLog("{0},BSCharacter.setTargetVelocity,call,vel={1}", LocalID, value); | 465 | DetailLog("{0},BSCharacter.setTargetVelocity,call,vel={1}", LocalID, value); |
466 | OMV.Vector3 targetVel = value; | 466 | OMV.Vector3 targetVel = value; |
467 | if (_setAlwaysRun) | ||
468 | targetVel *= BSParam.AvatarAlwaysRunFactor; | ||
469 | |||
467 | PhysicsScene.TaintedObject("BSCharacter.setTargetVelocity", delegate() | 470 | PhysicsScene.TaintedObject("BSCharacter.setTargetVelocity", delegate() |
468 | { | 471 | { |
469 | _velocityMotor.Reset(); | 472 | _velocityMotor.Reset(); |
470 | _velocityMotor.SetTarget(targetVel); | 473 | _velocityMotor.SetTarget(targetVel); |
471 | _velocityMotor.SetCurrent(_velocity); | 474 | _velocityMotor.SetCurrent(_velocity); |
472 | _velocityMotor.Enabled = true; | 475 | _velocityMotor.Enabled = true; |
473 | |||
474 | // Make sure a property update happens next step so the motor gets incorporated. | ||
475 | BulletSimAPI.PushUpdate2(PhysBody.ptr); | ||
476 | }); | 476 | }); |
477 | } | 477 | } |
478 | } | 478 | } |