aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs14
-rwxr-xr-xOpenSim/Region/PhysicsModules/BulletS/BSParam.cs3
2 files changed, 13 insertions, 4 deletions
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
index 7faee70..d182c34 100644
--- a/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs
@@ -460,13 +460,19 @@ public sealed class BSCharacter : BSPhysObject
460 set 460 set
461 { 461 {
462 DetailLog("{0},BSCharacter.setTargetVelocity,call,vel={1}", LocalID, value); 462 DetailLog("{0},BSCharacter.setTargetVelocity,call,vel={1}", LocalID, value);
463 base.m_targetVelocity = value;
464 OMV.Vector3 targetVel = value; 463 OMV.Vector3 targetVel = value;
465 if (_setAlwaysRun && !_flying) 464 if (!_flying)
466 targetVel *= new OMV.Vector3(BSParam.AvatarAlwaysRunFactor, BSParam.AvatarAlwaysRunFactor, 1f); 465 {
466 if (_setAlwaysRun)
467 targetVel *= new OMV.Vector3(BSParam.AvatarAlwaysRunFactor, BSParam.AvatarAlwaysRunFactor, 1f);
468 else
469 if (BSParam.AvatarWalkVelocityFactor != 1f)
470 targetVel *= new OMV.Vector3(BSParam.AvatarWalkVelocityFactor, BSParam.AvatarWalkVelocityFactor, 1f);
471 }
472 base.m_targetVelocity = targetVel;
467 473
468 if (m_moveActor != null) 474 if (m_moveActor != null)
469 m_moveActor.SetVelocityAndTarget(RawVelocity, targetVel, false /* inTaintTime */); 475 m_moveActor.SetVelocityAndTarget(RawVelocity, base.m_targetVelocity, false /* inTaintTime */);
470 } 476 }
471 } 477 }
472 // Directly setting velocity means this is what the user really wants now. 478 // Directly setting velocity means this is what the user really wants now.
diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs
index fcda92c..495f752 100755
--- a/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs
+++ b/OpenSim/Region/PhysicsModules/BulletS/BSParam.cs
@@ -135,6 +135,7 @@ public static class BSParam
135 public static bool AvatarToAvatarCollisionsByDefault { get; private set; } 135 public static bool AvatarToAvatarCollisionsByDefault { get; private set; }
136 public static float AvatarFriction { get; private set; } 136 public static float AvatarFriction { get; private set; }
137 public static float AvatarStandingFriction { get; private set; } 137 public static float AvatarStandingFriction { get; private set; }
138 public static float AvatarWalkVelocityFactor { get; private set; }
138 public static float AvatarAlwaysRunFactor { get; private set; } 139 public static float AvatarAlwaysRunFactor { get; private set; }
139 public static float AvatarDensity { get; private set; } 140 public static float AvatarDensity { get; private set; }
140 public static float AvatarRestitution { get; private set; } 141 public static float AvatarRestitution { get; private set; }
@@ -604,6 +605,8 @@ public static class BSParam
604 0.2f ), 605 0.2f ),
605 new ParameterDefn<float>("AvatarStandingFriction", "Avatar friction when standing. Changed on avatar recreation.", 606 new ParameterDefn<float>("AvatarStandingFriction", "Avatar friction when standing. Changed on avatar recreation.",
606 0.95f ), 607 0.95f ),
608 new ParameterDefn<float>("AvatarWalkVelocityFactor", "Speed multiplier if avatar is walking",
609 1.0f ),
607 new ParameterDefn<float>("AvatarAlwaysRunFactor", "Speed multiplier if avatar is set to always run", 610 new ParameterDefn<float>("AvatarAlwaysRunFactor", "Speed multiplier if avatar is set to always run",
608 1.3f ), 611 1.3f ),
609 // For historical reasons, density is reported * 100 612 // For historical reasons, density is reported * 100