aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
authorUbitUmarov2012-05-02 22:08:09 +0100
committerUbitUmarov2012-05-02 22:08:09 +0100
commita135e51d232143556e8154ccffeaf4860e02e33d (patch)
treed31b5e5c3bc04fdd006042a332ad13c59a08ecc4 /OpenSim/Region/Physics
parentBogus change to get a version number (diff)
downloadopensim-SC_OLD-a135e51d232143556e8154ccffeaf4860e02e33d.zip
opensim-SC_OLD-a135e51d232143556e8154ccffeaf4860e02e33d.tar.gz
opensim-SC_OLD-a135e51d232143556e8154ccffeaf4860e02e33d.tar.bz2
opensim-SC_OLD-a135e51d232143556e8154ccffeaf4860e02e33d.tar.xz
Improved sitted avatars crossings ( plus tests on vehicles)
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs11
1 files changed, 6 insertions, 5 deletions
diff --git a/OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs b/OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs
index 7b232c1..9fefc4e 100644
--- a/OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs
+++ b/OpenSim/Region/Physics/UbitOdePlugin/ODEDynamics.cs
@@ -793,10 +793,7 @@ namespace OpenSim.Region.Physics.OdePlugin
793 float perr; 793 float perr;
794 794
795 // default to global but don't go underground 795 // default to global but don't go underground
796 if (t < m_VhoverHeight) 796 perr = m_VhoverHeight - pos.Z;
797 perr = m_VhoverHeight - pos.Z;
798 else
799 perr = t - pos.Z; ;
800 797
801 if ((m_flags & VehicleFlag.HOVER_GLOBAL_HEIGHT) == 0) 798 if ((m_flags & VehicleFlag.HOVER_GLOBAL_HEIGHT) == 0)
802 { 799 {
@@ -817,9 +814,13 @@ namespace OpenSim.Region.Physics.OdePlugin
817 perr += w; 814 perr += w;
818 } 815 }
819 } 816 }
817 else if (t > m_VhoverHeight)
818 perr = t - pos.Z; ;
819
820 if ((m_flags & VehicleFlag.HOVER_UP_ONLY) == 0 || perr > 0) 820 if ((m_flags & VehicleFlag.HOVER_UP_ONLY) == 0 || perr > 0)
821 { 821 {
822 force.Z += (perr / m_VhoverTimescale / m_VhoverTimescale - curVel.Z * m_VhoverEfficiency) / m_timestep; 822 // force.Z += (perr / m_VhoverTimescale / m_VhoverTimescale - curVel.Z * m_VhoverEfficiency) / m_timestep;
823 force.Z += (perr / m_VhoverTimescale - curVel.Z * m_VhoverEfficiency);// * m_invtimestep);
823 force.Z += _pParentScene.gravityz * (1f - m_VehicleBuoyancy); 824 force.Z += _pParentScene.gravityz * (1f - m_VehicleBuoyancy);
824 } 825 }
825 else // no buoyancy 826 else // no buoyancy