aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
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