diff options
author | teravus | 2012-10-02 23:14:35 -0400 |
---|---|---|
committer | teravus | 2012-10-02 23:14:35 -0400 |
commit | df3d1d13014cf937240ddc2131231624b47eaccd (patch) | |
tree | 96223544b451e877a5d6c82aa6f6cc38597da1a9 /OpenSim | |
parent | BulletSim: fix crash on load that showed up on 32bit Linux. (diff) | |
download | opensim-SC-df3d1d13014cf937240ddc2131231624b47eaccd.zip opensim-SC-df3d1d13014cf937240ddc2131231624b47eaccd.tar.gz opensim-SC-df3d1d13014cf937240ddc2131231624b47eaccd.tar.bz2 opensim-SC-df3d1d13014cf937240ddc2131231624b47eaccd.tar.xz |
Minor Modification, switch /2 to 0.5f in ODEPrim.Velocity
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 0716214..3056f67 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -2395,15 +2395,15 @@ Console.WriteLine(" JointCreateFixed"); | |||
2395 | { | 2395 | { |
2396 | get | 2396 | get |
2397 | { | 2397 | { |
2398 | // Averate previous velocity with the new one so | 2398 | // Average previous velocity with the new one so |
2399 | // client object interpolation works a 'little' better | 2399 | // client object interpolation works a 'little' better |
2400 | if (_zeroFlag) | 2400 | if (_zeroFlag) |
2401 | return Vector3.Zero; | 2401 | return Vector3.Zero; |
2402 | 2402 | ||
2403 | Vector3 returnVelocity = Vector3.Zero; | 2403 | Vector3 returnVelocity = Vector3.Zero; |
2404 | returnVelocity.X = (m_lastVelocity.X + _velocity.X)/2; | 2404 | returnVelocity.X = (m_lastVelocity.X + _velocity.X) * 0.5f; // 0.5f is mathematically equiv to '/ 2' |
2405 | returnVelocity.Y = (m_lastVelocity.Y + _velocity.Y)/2; | 2405 | returnVelocity.Y = (m_lastVelocity.Y + _velocity.Y) * 0.5f; |
2406 | returnVelocity.Z = (m_lastVelocity.Z + _velocity.Z)/2; | 2406 | returnVelocity.Z = (m_lastVelocity.Z + _velocity.Z) * 0.5f; |
2407 | return returnVelocity; | 2407 | return returnVelocity; |
2408 | } | 2408 | } |
2409 | set | 2409 | set |