aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs6
-rwxr-xr-xOpenSim/Region/Physics/BulletSPlugin/BSParam.cs6
2 files changed, 9 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 }
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
index f8f24bd..5c8553a 100755
--- a/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSParam.cs
@@ -68,6 +68,7 @@ public static class BSParam
68 // Avatar parameters 68 // Avatar parameters
69 public static float AvatarFriction { get; private set; } 69 public static float AvatarFriction { get; private set; }
70 public static float AvatarStandingFriction { get; private set; } 70 public static float AvatarStandingFriction { get; private set; }
71 public static float AvatarAlwaysRunFactor { get; private set; }
71 public static float AvatarDensity { get; private set; } 72 public static float AvatarDensity { get; private set; }
72 public static float AvatarRestitution { get; private set; } 73 public static float AvatarRestitution { get; private set; }
73 public static float AvatarCapsuleWidth { get; private set; } 74 public static float AvatarCapsuleWidth { get; private set; }
@@ -367,6 +368,11 @@ public static class BSParam
367 (s,cf,p,v) => { AvatarStandingFriction = cf.GetFloat(p, v); }, 368 (s,cf,p,v) => { AvatarStandingFriction = cf.GetFloat(p, v); },
368 (s) => { return AvatarStandingFriction; }, 369 (s) => { return AvatarStandingFriction; },
369 (s,p,l,v) => { AvatarStandingFriction = v; } ), 370 (s,p,l,v) => { AvatarStandingFriction = v; } ),
371 new ParameterDefn("AvatarAlwaysRunFactor", "Speed multiplier if avatar is set to always run",
372 1.3f,
373 (s,cf,p,v) => { AvatarAlwaysRunFactor = cf.GetFloat(p, v); },
374 (s) => { return AvatarAlwaysRunFactor; },
375 (s,p,l,v) => { AvatarAlwaysRunFactor = v; } ),
370 new ParameterDefn("AvatarDensity", "Density of an avatar. Changed on avatar recreation.", 376 new ParameterDefn("AvatarDensity", "Density of an avatar. Changed on avatar recreation.",
371 3.5f, 377 3.5f,
372 (s,cf,p,v) => { AvatarDensity = cf.GetFloat(p, v); }, 378 (s,cf,p,v) => { AvatarDensity = cf.GetFloat(p, v); },