aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
diff options
context:
space:
mode:
authorRobert Adams2013-03-01 08:52:06 -0800
committerRobert Adams2013-03-01 09:44:37 -0800
commit1c740798b45dddb3e056b2e281fe98de6bf35143 (patch)
tree47f205e9679e4428a7fa7f9e868ee02218ee61bd /OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
parentMerge branch 'master' of ssh://opensimulator.org/var/git/opensim (diff)
downloadopensim-SC_OLD-1c740798b45dddb3e056b2e281fe98de6bf35143.zip
opensim-SC_OLD-1c740798b45dddb3e056b2e281fe98de6bf35143.tar.gz
opensim-SC_OLD-1c740798b45dddb3e056b2e281fe98de6bf35143.tar.bz2
opensim-SC_OLD-1c740798b45dddb3e056b2e281fe98de6bf35143.tar.xz
BulletSim: add parameters, code cleanup around checking and enforcing
maximum velocity and angular velocity values for prims.
Diffstat (limited to 'OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs')
-rw-r--r--OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
index e6933f9..235cefc 100644
--- a/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
+++ b/OpenSim/Region/Physics/BulletSPlugin/BSDynamics.cs
@@ -961,13 +961,13 @@ namespace OpenSim.Region.Physics.BulletSPlugin
961 // ================================================================== 961 // ==================================================================
962 // Clamp high or low velocities 962 // Clamp high or low velocities
963 float newVelocityLengthSq = VehicleVelocity.LengthSquared(); 963 float newVelocityLengthSq = VehicleVelocity.LengthSquared();
964 if (newVelocityLengthSq > BSParam.VehicleMaxLinearVelocitySq) 964 if (newVelocityLengthSq > BSParam.VehicleMaxLinearVelocitySquared)
965 { 965 {
966 Vector3 origVelW = VehicleVelocity; // DEBUG DEBUG 966 Vector3 origVelW = VehicleVelocity; // DEBUG DEBUG
967 VehicleVelocity /= VehicleVelocity.Length(); 967 VehicleVelocity /= VehicleVelocity.Length();
968 VehicleVelocity *= BSParam.VehicleMaxLinearVelocity; 968 VehicleVelocity *= BSParam.VehicleMaxLinearVelocity;
969 VDetailLog("{0}, MoveLinear,clampMax,origVelW={1},lenSq={2},maxVelSq={3},,newVelW={4}", 969 VDetailLog("{0}, MoveLinear,clampMax,origVelW={1},lenSq={2},maxVelSq={3},,newVelW={4}",
970 Prim.LocalID, origVelW, newVelocityLengthSq, BSParam.VehicleMaxLinearVelocitySq, VehicleVelocity); 970 Prim.LocalID, origVelW, newVelocityLengthSq, BSParam.VehicleMaxLinearVelocitySquared, VehicleVelocity);
971 } 971 }
972 else if (newVelocityLengthSq < 0.001f) 972 else if (newVelocityLengthSq < 0.001f)
973 VehicleVelocity = Vector3.Zero; 973 VehicleVelocity = Vector3.Zero;