diff options
author | Robert Adams | 2017-10-13 12:00:07 -0700 |
---|---|---|
committer | Robert Adams | 2017-10-13 12:00:07 -0700 |
commit | df3759e09998bd05c2a09c79c38ada66fa6ec785 (patch) | |
tree | caa970ca92255d54bcd80f36d0536c53b959a73e /OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs | |
parent | remove a dead line of code (diff) | |
download | opensim-SC-df3759e09998bd05c2a09c79c38ada66fa6ec785.zip opensim-SC-df3759e09998bd05c2a09c79c38ada66fa6ec785.tar.gz opensim-SC-df3759e09998bd05c2a09c79c38ada66fa6ec785.tar.bz2 opensim-SC-df3759e09998bd05c2a09c79c38ada66fa6ec785.tar.xz |
BulletSim: Add parameter "[BulletSim]AvatarWalkVelocityFactor=1.0" to
adjust the walking speed passed from the simulator. Default is 1.0f so
there should be no change for regions who do not change the factor.
The adjustment for walking speed and AlwaysRun speed should be in the
simulator and not the physics engines (who all assume TargetVelocity.set
is only used for avatar walking/running) but that would require tweaking
all the phyiscs engines.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/PhysicsModules/BulletS/BSCharacter.cs | 14 |
1 files changed, 10 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. |